Jump to content

Database populated dropdown only sends first word


cclark40

Recommended Posts

Hi Folks,

 

I have a problem with the script below.  It simply populates a dropdown box as part of a larger form with data from a database and sends it to the submit page where it updates the database.  The data populates fine but when it sends to the submit page it truncates the data so only the first word on the entry gets sent.  Most of the entries are a single word so work fine but a few have 2 or 3 words separated by a space so "Williamstown" is fine but "Horsham Kalimna Park" just becomes "Horsham".

Can anyone see what the problem is?

 

$result2 = mysql_query("SELECT id, clubname FROM clubs");

echo "<select name='tournamentvenue2update'><option></option>";

while($club_list2=mysql_fetch_array($result2))

{

echo '<option value='.$club_list2[clubname].'>'.$club_list2[clubname].'</option>';

}

echo "</select>";

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.