PDA

View Full Version : if condition show[avatar] in PHP?


Sychev_S
02-13-2007, 03:10 AM
I have a module that displays random users and their avatars, how can I set default avatar to display for those who dont have any?

So far I came up with this, but it doesnt really work.


if ($show['avatar'])
{
$HTML .= " <a href=\"forums/member.php?u=" . $topvote['userid'] . "\"><img src=\"forums/image.php?u=" . $topvote['userid'] . "&amp;dateline=".$topvote['dateline']."\" alt=\"View Profile\" border=\"0\" ></a>\n";

}
else
{
$HTML .= " <a href=\"forums/member.php?u=" . $topvote['userid'] . "\"><img src=\"/forums/images/no_picsmall.gif" alt=\"View Profile\" border=\"0\" ></a>\n";
}

anyone?

bump!

.............

Sychev_S
02-14-2007, 01:26 PM
bump!

Sychev_S
02-21-2007, 10:04 PM
up!!!!