hi, can someone help to solve this problem, i dont know how to get the data in select-option object? the code should get all the data in it.
thnx
How can i get the data in a select-option?
Moderator: General Moderators
-
sureshmaharana
- Forum Commoner
- Posts: 30
- Joined: Thu Jul 03, 2008 4:20 am
- Contact:
Re: How can i get the data in a select-option?
Can u explain your problem in detail.
thanks.
thanks.
Re: How can i get the data in a select-option?
If its a dropdown list then
<select name="abc" />
<option value="pqr"> pqr </option>
<option value="pqr1"> pqr1 </option>
<option value="pqr2"> pqr2 </option>
</select>
if your form method is post then
$_POST['abc'] will give you the selected item in the list.
If its a multi select then
$_POST['abc'] will return an array which will contain all the selected values in the list.
<select name="abc" />
<option value="pqr"> pqr </option>
<option value="pqr1"> pqr1 </option>
<option value="pqr2"> pqr2 </option>
</select>
if your form method is post then
$_POST['abc'] will give you the selected item in the list.
If its a multi select then
$_POST['abc'] will return an array which will contain all the selected values in the list.