I've essentially got a form with several drop down, each populated by columns in various tables.
The populating bit works fine - the column rows appear as they should in the menu.
Ideally the user needs to make their selections, and enter the form into a new database table.
The problem is, when the selection is entered into the new table, only the first word of the string is entered. For example, the drop down may have...
"Category One"
"Category Two"
"Category Three"
When the form is submitted only the word "Category" is entered into the database.
Here is the code, it takes the column 'courseTitle' from one table, displays it in a menu, and then saves the selection into a new table as 'eventName'.
Expand|Select|Wrap|Line Numbers
- <?
- include("connect.php");
- $query="SELECT courseTitle FROM course";
- $result = mysql_query ($query);
- echo "<select name='eventName'=''></option>";
- while($nt=mysql_fetch_array($result)){//Array or records stored in $nt
- echo "<option value=$nt[courseTitle]>$nt[courseTitle]</option>";
- }
- echo "</select>";// Closing of list box
- ?>
Apologies if I've made it slightly long winded.