Hey everyone. Got a little problem with an html dropdown box I'm using in a php document. Here's the code I'm using:
echo "<td width=52% bgcolor=cdcdcd><form method=post action=myphpdocument.php>";
$query = mysql_query("SELECT clientname FROM clients");
echo "<select name=client>";
while ($r = mysql_fetch_array($query))
{
$client = $r["clientname"];
echo "<option value=$client>$client</option>";
}
echo"</select>";
The dropdown box populates with all the fields properly from the database, but when you submit the form, it only sends the first word of the choice you've chosen in the box. So for example if the choices in the dropdown box were:
Mellow Yellow
Dr. Pepper
Diet Pepsi
Then if you select "Mellow Yellow", the form would only send the word "Mellow", or "Dr." or "Diet" and so forth. How can I get it to submit the entire line?