continued from dating site post
I am having problems with my drop down option values for my form input. The values are numbers for users gender, birthday, birth month etc... . my uersname, password and email are sent to database, but the option values are all zero for the number option input fields. Any thoughts.
here is my sql write to data.
the $curnum is just for air checking.
if($curnum == 0) {
mysql_query("INSERT INTO usermembers VALUES(`id`,'".$username."','".$password."','".$email."','$gender',
'$birthmonth','$birthday','$birthyear','$ethnicity','$country')") or
die(mysql_error());
}
and here is the option value for say birthday.
<select class="input" name="birthday">
<?PHP
$daynum = 0;
while ($daynum <= 30) {
$daynum ++;
echo "<option value=".$daynum." ";
if($_POST['birthday'] == $daynum) {
echo "SELECTED";//again air chking }
echo ">".$daynum."</option>";
}
?>
</select>
If the sql fields for the option values is set to INT. How to I get that number value to database.
this is really bothering me.
I don't understand why the varchar data is entered in the sql but not the drop down option number values.
can you please help me.
thanks a million.
mike
MOD EDIT: 'PHP' bbcode tags used (for syntax highlighting) inserted of 'CODE' tags.