0

I would like to ask if how to get the data in a select(box) not the value one...example: if i select (one) i would like to get the data "one" instead of (1) and transfer it to another inputs..how do i do that?

<select name="number">
<option value="1">one</option>
<option value="2">two</option>
</select>

if i do this:

$num = $_POST['number']; 

the value of $num will be (1) how do i make it (one)?

xplody
  • 103
  • 1
  • 13

1 Answers1

0

Only the value attribute of a select option gets passed to the php script. So you'd need to update your option value to <option value="one">one</option>

OK11
  • 74
  • 3