Whats wrong with this code

Started on the old forum in May 2010 · view the original in the archive · old links redirect here

3 replies · 346 views · started 16 years ago · 1 min read

3 participants
icen01 Developer · 72 posts #1

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"/>"; }

pin0y likes wap

icen01 Developer · 72 posts #3

it works thankz alot hehehe

pin0y likes wap

kevk3v Senior · 332 posts #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

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