phphelpme Posted December 5, 2010 Share Posted December 5, 2010 how do i insert this into a database? i need the php code please. <select class="select" name="sex" id="sex"> <option value="0">Select Gender</option> <option value="1">Female</option> <option value="2">Male</option></select> I need it to insert what ever one they select Thanks Quote Link to comment Share on other sites More sharing options...
Zurev Posted December 5, 2010 Share Posted December 5, 2010 Right, this is a forum to help with your php coding issues, not to simply write the code for you. Ya gotta give us at least something, if you know the basics of php/mysql then take a look at - http://www.tizag.com/mysqlTutorial/mysqlinsert.php Otherwise, we can help you if you have some code that's error'ing out if that's the case. But just i need the code please isn't what it's for, at least I don't think so...still new myself. Quote Link to comment Share on other sites More sharing options...
hyster Posted December 5, 2010 Share Posted December 5, 2010 ot try http://phpeasystep.com/mysql/5.html ive used these tutorials alot of the last year. easy to modify to what you need. Quote Link to comment Share on other sites More sharing options...
phphelpme Posted December 6, 2010 Author Share Posted December 6, 2010 i need to know how to make the php code to insert what ever they picked out of these options <label for="Gender">Gender:</label> </div><div align="left"><select class="select" name="sex" id="sex"> <option value="0">Select Gender</option> <option value="1">Female</option> <option value="2">Male</option></select></div> Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted December 6, 2010 Share Posted December 6, 2010 http://www.w3schools.com/php/php_forms.asp Quote Link to comment Share on other sites More sharing options...
phphelpme Posted December 7, 2010 Author Share Posted December 7, 2010 i need to know how to make the php code to insert what ever they picked out of these options , insert in to the database for gender and what ever gender they picked will determine there profile , please help! <label for="Gender">Gender:</label> </div><div align="left"><select class="select" name="sex" id="sex"> <option value="0">Select Gender</option> <option value="1">Female</option> <option value="2">Male</option></select></div> Quote Link to comment Share on other sites More sharing options...
trq Posted December 7, 2010 Share Posted December 7, 2010 There is a link in my signature to a free book (Hudzilla). It has entire chapters dedicated to using databases and handling forms. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.