php - Open a new page with posted variable when the user select the dropdown -


I have a dropdown puller from the database. When the user selects any of the dropdowns, then he should open a new page with a post variable pulled from the dropdown value.

So far, let me do this

  echo ' ';; Option '& lt; OPTION VALUE = "- 1" selected & gt; '. 'Choose project.' & Lt; / OPTION & gt; '; While ($ row = oci_fetch_array ($ compCuttingResult, OCI_ASSOC)) {$ projectName = $ line ['PROJECT_NAME']; Echo "& lt; OPTION name = 'value selected' VALUE = '$ projectName' class = 'icon-facebook' & gt; $ projectName & lt; / OPTION & gt;"; } Echo '& lt; / SELECT & gt; & Lt; / Label & gt; & Lt; Br / & gt; ';    

  echo & lt; Label & gt; & Lt; SELECT name = "cd-dropdown" id = "cd-dropdown" onchange = "myfunction ()" class = "cd-select" & gt; '.' & Lt; Br> '; Option '& lt; OPTION VALUE = "- 1" selected & gt; '. 'Choose project.' & Lt; / OPTION & gt; '; Echo "& lt; OPTION name = 'value selected' VALUE = 'test' class = 'icon-fab'> test & lt; / OPTION & gt;"; Echo '& lt; / SELECT & gt; & Lt; / Label & gt; & Lt; Br / & gt; '; ? & Gt; & Lt; Script type = "text / javascript" & gt; Function myFunction () {var myselect = document.getElementById ("cd-dropdown"); Var val = myselect.options [myselect.selectedIndex] .value; Window.location = "https://www.google.co.in/#q="+val; } & Lt; / Script & gt;    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -