rdkd1970 Posted May 30, 2011 Author Share Posted May 30, 2011 This is the results printed. string(6) "Female" string(4) "Male" string(6) "Female" string(4) "Male" string(6) "Female" string(4) "male" string(6) "female" string(6) "female" string(4) "male" string(6) "female" I checked my db it is the order of the names i have in there. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted May 30, 2011 Share Posted May 30, 2011 And don't forget to add your database connection credentials . . . Quote Link to comment Share on other sites More sharing options...
rdkd1970 Posted May 30, 2011 Author Share Posted May 30, 2011 Hey I am not familiar with the switch statement but is it usable in the situation.??? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted May 31, 2011 Share Posted May 31, 2011 Well, I see one potential problem with the output. If your table isn't using a case-insensitive collation, you won't match all the results. Let's get this fixed once and for all. Please post the part of the form that includes the <select> (or <input>, if that's the case) field for the gender. Quote Link to comment Share on other sites More sharing options...
rdkd1970 Posted May 31, 2011 Author Share Posted May 31, 2011 <select class="formFields" name="gender" id="gender"> <option value="<?php print "$gender"; ?>"><?php print "$gender"; ?></option> <option value="male">Male</option> <option value="female">Female</option> </select> Quote Link to comment Share on other sites More sharing options...
rdkd1970 Posted June 1, 2011 Author Share Posted June 1, 2011 I was just reading up on this situation came across that the db has to be set up with enum with 'a','b' but I am just trying to get a better understanding of how to go about it more. If you know let me know. 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.