javascript - drop down value not post -


thanks here, have drop down in html form.

<p>     <select id="categoryselection">         <option value="0">choose one</option>         <option value="research">research</option>         <option value="innovation">innovation</option>         <option value="application">application</option>         <option value="integration">integration</option>     </select> </p> 

depending on choose - javascript shows different questions follow this. following questions , else posting db (mysql) table fine. can't value post- shows null. there missing because of javascript? new in area. thanks!

$_post values derive name attribute, not id. select needs name, this:

 <select name="categoryselection" id="categoryselection"> 

then can access value in $_post array usual:

if (isset($_post['categoryselection'])){     $category = $_post['categoryselection']; } 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -