Only shows one?

Grant

New Member
Jul 11, 2010
28
2
I've ran into a problem, I've just began to edit that uberCMS edit from PeJump2. (I liked it.. #palmface#) Anyway's, I've started to try and do a "My Page" which shows your common statistics like badges, friends and so on. However, I can't get all the users badges to show.

Just wondering if any of you could help me..

Heres my code for Home.php
PHP:
$getBadge = dbquery("SELECT * FROM user_badges WHERE user_id = '" . USER_ID . "'");

if(mysql_num_rows($getBadge) == 0)
{
    $badge = '<center><p>This user has not achieved any achievements!</p></center>';
}

while($getBadges = mysql_fetch_array($getBadge))
{    
    $badge = '<img src="c_images/album1584/'. $getBadges['badge_id'] .'.gif" />';
}

$compHome->SetParam('badge', $badge);

There is more, but it's just the badge bit I need help with.

And here is my Home.tpl
PHP:
%badge%

-----

At the moment, it all works except the problem is it only shows one badge. Can any of you help me make it show all the users badges?
 

Users who are viewing this thread

Top