Whats Wrong With This Code

Started on the old forum in January 2009 · view the original in the archive · old links redirect here

6 replies · 523 views · started 17 years ago · 1 min read

4 participants
Rider Developer · 128 posts #1
 $nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location FROM ibwf_users WHERE id='".$who."'"));
  $uage = getage($nopl[1]);
  if($nopl[0]=='M')
  {
    $usex = "Male";
  }else if($nopl[0]=='F'){
    $usex = "Female";
  }else{
    $usex = "Shemale";
  }
  $nopl[2] = htmlspecialchars($nopl[2]);
  echo "A/S/L: [b]$uage/$usex/$nopl[2][/b]
";

it keep on saying my members are shemale

Rider Developer · 128 posts #2
$avlink = getavatar($who);
  if ($avlink=="")
  { 
    $sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$who."'"));
    if($sex[0]=='M')
         {
      echo "
<img src=\"images/nophotoboy.gif\" alt=\"avatar\"/>
";
    }else if($sex[0]=='F')
          {
            echo "
<img src=\"images/nophotogirl.gif\" alt=\"avatar\"/>
";
          }else{
                 echo "
<img src=\"images/nopic.jpg\" alt=\"avatar\"/>
";
               }
  }else{
  echo "
<img src=\"$avlink\" alt=\"avatar\"/>

";
  }

i wona use this in online list who can fix it for me to be 15x15 next to the user name please

amylee Principal · 1,092 posts #3

QUOTE (Numb @ Jan 6 2009, 06:56 PM) <{POST_SNAPBACK}>

 $nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location FROM ibwf_users WHERE id='".$who."'"));
   $uage = getage($nopl[1]);
   if($nopl[0]=='M')
   {
     $usex = "Male";
   }else if($nopl[0]=='F'){
     $usex = "Female";
   }else{
     $usex = "Shemale";
   }
   $nopl[2] = htmlspecialchars($nopl[2]);
   echo "A/S/L: $uage/$usex/$nopl[2]
";

it keep on saying my members are shemale

that because they do not define if they are female or male in thier profiles

Rider Developer · 128 posts #4

Nope when i check the profile it say male or female except on the main menu it say shemale

something else Fellow · 2,296 posts #5

turn globals on again or type

$sex = $_POST["sex"];

or whatever it is on registration

kaibaspoon Developer · 63 posts #6

Try this code CODE$uage = getage($nopl[1]);

if($nopl[0]=='M')

{

$usex = "Male";

}else if($nopl[0]=='F'){

$usex = "Female";

}else{

$usex = "Ladyboy";

} $nopl[2] = htmlspecialchars($nopl[2]); echo "Age: $uage "; echo "Sex: $usex ";

Rider Developer · 128 posts #7
$uage = getage($nopl[1]);

  if($nopl[0]=='M')

  {

    $usex = "LadyBoy";

  }else if($nopl[0]=='F'){

    $usex = "Female";

  }else{

    $usex = "Male";

  }

this will now work that it say its male and female

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close