Jump to content

while loop to pick a certain type from db??


rdkd1970

Recommended Posts

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.

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.

<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>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.