i have made a subscription form with text fields and 1 combobox, where users need to select there choise, and that choise from the combobox (source for the combobox is readen from database) needs to be saved in a database table (database table props: name: clan type:varchar max. length: 254)
now i coded it but came up with the folowing problem, the value in the combobox (examplel: clan number 1) when selected and then submitted is only saved untill the first space (example: clan) and the rest is missing, did i make an error or what??
combobox code:
<?
include("config.inc.php");
mysql_connect("$host","$user","$pass");
mysql_select_db("$db");
$sql = "SELECT * FROM clanlist ";
$sql_result = mysql_query($sql);
$aantal = mysql_num_rows($sql_result);
echo "<select name=clan>";
for ($i=0; $i<$aantal; $i++) {
$item = mysql_result($sql_result, $i, "clan");
echo "<option value=$item>$item ";
}
echo "</select>";
?>