In my dropdownlist I have two different values for each option. How can I retrieve both? Let me illustrate what I mean.
<select name="my_ddl">
<option value="<?php $value_Id ?>"><?php $value_text ?></option>
<option value="<?php $value_Id ?>"><?php $value_text ?></option>
</select>
When the form is posted, I want to be able to get both the $value_id and $value_text of the selected option. How can I do this?
$_POST['my_ddl'] only gets one value not both.
In asp.net I could do this simply by referring to my_ddl.Value and my_ddl.Text.
Thank you!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…