option values on form input

int , number values in database , php sql help , option inputs , i dont know Waco, United States
  • 12 years ago
    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. 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
  • 12 years ago
    sorry code cut off. 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.
  • 12 years ago
    and here is the option value for say birthday.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why.”