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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -