The select tag is being generated from the database through PHP echo command.
After I post the form including my select element, I want to be able to retrieve the content (between option tag) as well as the value in the option tag. So if I chose Volvo and submitted the form. I want to retrieve Volvo and 1.
<select name='car'>
<option value='1'>Volvo</option>
<option value='2>Saab</option>
<option value='3>Mercede</option>
<option value='4>Audi</option>
</select>
This will only retrieve the value.
$_POST['car']
how can I retrieve both?
you can get like this
and
you get