friend request gender image

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    friend request gender image

    i want to add an icon to index that detect if u get a new friend request from a female or male if u get from both it just show a image of both how will i be doing this

    Code:
    $mybuds = getnbuds($uid);
      $onbuds = getonbuds($uid);
      $reqs = getnreqs($uid);
      if($reqs>0)
     {
     $newbud = ": <a href=\"../friends/index.php?action=reqs&amp;gender=2\"><img src=\"../images/female.png\" hight=\"45\" width=\"45\" alt=\"Request\"/>Female</a>";
      }else{
      $newbud = ": <a href=\"../friends/index.php?action=reqs&amp;gender=1\"><img src=\"../images/male.png\" hight=\"45\" width=\"45\" alt=\"Request\"/>Male</a>";
      }
    echo "<a href=\"../friends/index.php?action=buds\"><img src=\"../images/friends.png\" hight=\"45\" width=\"45\" alt=\"friends\"/></a>($onbuds|$mybuds) $newbud</small>";
    i really have no idea how to do this
    ________________
    Jacques
    jacques@gw-designs.co.za
    http://coding.biz.tm
    Come join and lets make it a place to learn all the noobies how to code
    __________________

    NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

    #2
    You must get gender from your database and store it in a variable then have something like
    PHP Code:
    if($reqs && $gender=='female'$newbud ": <a href=\"../friends/index.php?action=reqs&amp;gender=2\"><img src=\"../images/female.png\" hight=\"45\" width=\"45\" alt=\"Request\"/>Female</a>";
    else if(
    $reqs && $gender =='male')$newbud ": <a href=\"../friends/index.php?action=reqs&amp;gender=2\"><img src=\"../images/male.png\" hight=\"45\" width=\"45\" alt=\"Request\"/>Male</a>";
    else if(
    $reqs)$newbud ": <a href=\"../friends/index.php?action=reqs&amp;gender=2\"><img src=\"../images/both.png\" hight=\"45\" width=\"45\" alt=\"Request\"/></a>"
    Well... something almost like that
    libra.wen.ru

    Comment

    Working...
    X