sh0wtym3 Posted September 29, 2008 Share Posted September 29, 2008 Hey, I am trying to send information to my database using a form. The form below works for the "gender" field, but it does not send the "prefix" field (which is a drop down menu)...? The form code: <td><input type="text" name="gender" id="gender" class="gender" /></td> <td> Select your prefix: <select name="prefix" id="preifx" class="prefix"> <option value="Mrs">Mr</option> <option value="Mrs">Mrs</option> <option value="Ms">Ms</option> <option value="Miss">Miss</option> <option value="Dr">Dr</option> <option value="Choose" selected>Please select..</option> </td> <td> <input type="submit" name="btn" id="btn" value="Submit"> </td> The PHP code that is used with this form: $gender= $_POST['gender']; $preifx= $_POST['prefix']; mysql_query("INSERT INTO table (gender, prefix) VALUES('$gender','$prefix'") or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/126296-solved-using-php-with-form-drop-down-menu/ Share on other sites More sharing options...
redarrow Posted September 29, 2008 Share Posted September 29, 2008 where the </select> <<<<<<<<<<<<,,, Link to comment https://forums.phpfreaks.com/topic/126296-solved-using-php-with-form-drop-down-menu/#findComment-653053 Share on other sites More sharing options...
sh0wtym3 Posted September 29, 2008 Author Share Posted September 29, 2008 O... man... I feel dumb. Works now, lol. Link to comment https://forums.phpfreaks.com/topic/126296-solved-using-php-with-form-drop-down-menu/#findComment-653062 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.