Posting the selected html option attribute via php -
posting selected html option attribute via php..here html code , i'm trying select 1 option event-drop down menu, finding hard configure php variable $event. appreciated.
html code:
<div> <h4>event</h4> <p class="cd-select icon"> <select class="budget"> <option value="0">select occasion</option> <option value="1">alpha</option> <option value ="2">bravo</option> <option value="3">charlie</option> <option value="4">delta</option> </select> </p> </div>
php version
$event = $_post['selected'];
in php form fields posted name. in case you'd have add name attribute select.
<select class="budget" name="selected"> <option value="0">select occasion</option> <option value="1">alpha</option> <option value ="2">bravo</option> <option value="3">charlie</option> <option value="4">delta</option> </select>
Comments
Post a Comment