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>";

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.