Then I have an HTML dropdown that has been created in php. What I have to do, takes the chosen option and turns it into a variable, so I can pass it to another php page. Above this: echo & lt; Select ID = "myselect" name = "myselect" & gt; '; While ($ line = mysql_fetch_array ($ query)) {echo '& lt; Option value = "'. $ Line [' categories']. '" Id = "'. $ Line ['categories']." & Gt; '. $ Line ['categories']' & lt; / Option & gt; '. } Echo '& lt; / Select & gt; ';
echo & lt; Id = "myselect" name = "myselect" & gt; ; Echo '& lt; Option value = "make-selection" id = "make_selection" name = "make_selection" & gt; Choose your category & lt; / Option & gt; '; While ($ line = mysql_fetch_array ($ query)) {echo '& lt; Option value = "'. $ Line [' categories']. '" Id = "'. $ Line ['categories']." & Gt; '. $ Line ['categories']' & lt; / Option & gt; '. } Echo '& lt; / Select & gt; ';
if ($ _ POST) {$ selection = $ _POST ['Message_section']; // $ do something with selection / possibly redirecting the user to the header ('location: page .php'); }
Comments
Post a Comment