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
Post a Comment