Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print "<div class='style1'><br> <br><h2>User Medals</div></h3><br />In Testing Now
- <table width='80%' class=\"table\" border=\"0\" cellspacing=\"1\"><tr bgcolor=gray><th></th><th></th><th></th><th></th></tr>";
- $result=mysql_query("SELECT * FROM awardsearned WHERE userid=$userid group by rewardid");
- $count = 0;
- while($res=mysql_fetch_array($result))
- {
- $award = $res['rewardpic'];
- $award2 = $res['rewardid'];
- $result2=mysql_query("SELECT awardid, count(rewardid) FROM awardsearned WHERE rewardid=$award2 AND userid=$userid");
- $count2 = count($result2);
- if($count==4) //three images per row
- {
- print "</tr>";
- $count = 0;
- }
- if($count==0)
- print "<tr>";
- print "<td>";
- print "<center><img src='$award' width='100' height='100'/><br />x$count2</center> ";
- $count++;
- print "</td>";
- }
- if($count>0)
- print "</tr>";
- print "
- </table>";
Advertisement
Add Comment
Please, Sign In to add comment