I am trying to pull data from a table to fill a drop down list. Now, i got the fill part working, but am having an issue passing a variable value to my form post action.
Code:
$query ="SELECT UniqueIdentifier, LastName, FirstName
FROM BrokerMain
ORDER BY LastName";
$result = @mssql_query($query);
echo "<select name='test'><option value='default'>Choose a Broker:</option>";
while ($row=mssql_fetch_array($result))
{
$uid=$row;
$ln=$row;
$fn=$row;
$spacer= ", ";
echo "<option value='$uid'>" . $ln . $spacer . $fn . "</option>";
}
echo "</select>";
echo "<form action='editbroker.php?UniqueIdentifier=$uid' method='post'><td valign='top'><input type='submit' name='edit' value='Edit'/></form>";
End Code
The button is there, but the value of $uid is not being passed based on the user selected in the drop down box. Any ideas?