Whats wrong with this code

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

    Whats wrong with this code

    whats wrong with this code, because if the user has no avatar it doest view the "avatar.jpg" plsss help me



    in core.php
    /////////////////////////////////////////////////////////////////////

    function getavatar($uid)

    {

    $av = mysql_fetch_array(mysql_query("SELECT avatar FROM ibwf_users WHERE id='".$uid."'"));

    return $av[0];

    }


    in index.php
    action=="viewuser"
    /////////////////////////////////////////////////////////////////////////

    $avlink = getavatar($who);
    if ($avlink=="0")
    {
    echo "<img src=\"images/avatar.jpg\" alt=\"avatar\"/>";
    }else{
    echo "<img src=\"$avlink\" alt=\"avatar\"/>";
    }

    #2
    if ($avlink=="")

    Comment


      #3
      it works thankz alot hehehe

      Comment


        #4
        @something else can you leave some topics for me to answer pls lol?>.....
        Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

        Comment

        Working...
        X