tpiccirillo
asked on
Not selecting value from drop down list
I have created a drop down list that displays values from mysql database. The values are displayed but when a value is selected it no value is present. Using html form. Here is the drop down code:
echo "<select name=location value=''>Location</option> ";
// printing the list box select command
while($nt=mysql_fetch_arra y($result) ){//Array or records stored in $nt
echo "<option value=$nt[id]>$nt[location ]</option> ";
/* Option values are added by looping through the array */
}
echo "</select>";// Closing of list box
When I output Location in program that is called by form it is empty.
echo "<select name=location value=''>Location</option>
// printing the list box select command
while($nt=mysql_fetch_arra
echo "<option value=$nt[id]>$nt[location
/* Option values are added by looping through the array */
}
echo "</select>";// Closing of list box
When I output Location in program that is called by form it is empty.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Out put program is working okay for other fields. Just nothing in this field that is dynamically created.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try surrounding the $nt[id] by (double) quotes.