Guest User

Untitled

a guest
Mar 28th, 2013
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. print "<div class='style1'><br> <br><h2>User Medals</div></h3><br />In Testing Now
  2. <table width='80%' class=\"table\" border=\"0\" cellspacing=\"1\"><tr bgcolor=gray><th></th><th></th><th></th><th></th></tr>";
  3. $result=mysql_query("SELECT * FROM awardsearned WHERE userid=$userid group by rewardid");
  4. $count = 0;
  5. while($res=mysql_fetch_array($result))
  6. {
  7. $award = $res['rewardpic'];
  8. $award2 = $res['rewardid'];
  9. $result2=mysql_query("SELECT awardid, count(rewardid) FROM awardsearned WHERE rewardid=$award2 AND userid=$userid");
  10. $count2 = count($result2);
  11. if($count==4) //three images per row
  12. {
  13. print "</tr>";
  14. $count = 0;
  15. }
  16. if($count==0)
  17. print "<tr>";
  18. print "<td>";
  19.  
  20.  
  21. print "<center><img src='$award' width='100' height='100'/><br />x$count2</center> ";
  22.  
  23.  
  24.  
  25. $count++;
  26. print "</td>";
  27. }
  28. if($count>0)
  29. print "</tr>";
  30. print "
  31. </table>";
Advertisement
Add Comment
Please, Sign In to add comment