title: Add images to rank 1, 2 and 3 with MySQL and PHP
body: <p>im trying to add 3 images to my PHP code, for people who are rank 1, 2 and 3.
  But I can't seem to get it to work</p>
  
  <p>I got 3 images called gold_medal.png, silver_medal.png and bronze_medal.png</p>
  
  <p>here is my code</p>
  
  <pre><code>&lt;?php 
          //Database Info 
          $host = 'xxx.xxx.xxx.xxx'; 
          $user = 'xxxxxxxxxxxxx'; 
          $pass = 'xxxxxxxxxxxxx';
          $db = 'hall_of_fame'; 
  
  &lt;table&gt; 
      &lt;tr&gt; 
      &lt;th&gt;Rank&lt;/th&gt; 
      &lt;th&gt;Player&lt;/th&gt; 
      &lt;th&gt;Donation&lt;/th&gt; 
      &lt;/tr&gt;
  &lt;?php
  //Connect to the SQL server and select the database... 
  mysql_connect($host, $user, $pass) or die('Couldn\'t connect to the MySQL server.'); 
  mysql_select_db("$db") or die(mysql_error());
  
  $rowsPerPage = 10;
  // if $_GET['page'] defined, use it as page number
  
  function steam2friend($steam_id){ 
  $steam_id = strtolower($steam_id); 
      if(substr($steam_id,0,7) == 'steam_0'){ 
          $tmp = explode(':',$steam_id); 
              if((count($tmp)==3) &amp;&amp; is_numeric($tmp[1]) &amp;&amp; is_numeric($tmp[2])){ 
                  return bcadd((($tmp[2]*2)+$tmp[1]),'76561197960265728'); 
              }else{ 
              return false; 
              } 
              }else{ 
              return false; 
          } 
      } 
  
  
  $result = mysql_query("SELECT * FROM hof_players ORDER BY donation DESC LIMIT $rowsPerPage") or die(mysql_error());
  $result2 = mysql_query("SELECT * FROM hof_players ORDER BY donation DESC LIMIT $rowsPerPage") or die(mysql_error());
  $Rank = 1;
  while ($row = mysql_fetch_row($result))
  {
              while($row = mysql_fetch_array($result2)){ 
              echo "&lt;tr align=center&gt;";
              echo "&lt;td&gt;";
              echo $Rank++;
              echo "&lt;/td&gt;";
              if(!empty($row['name']) &amp;&amp; $row['name'] != ' '){ 
              echo "&lt;td&gt;" . '&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/i&gt;' . '&lt;a href="http://steamcommunity.com/profiles/'.steam2friend($row['steamid']).'" target="_blank"&gt;'.$row['name'].'&lt;/a&gt;' . '&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/i&gt;' . "&lt;/td&gt;"; 
              } 
              else{ 
              echo "&lt;td&gt;" . 'No Player In DB' . "&lt;/td&gt;"; 
              }
              if(!empty($row['donation']) &amp;&amp; $row['donation'] != ' '){ 
              echo "&lt;td&gt;" . $row['donation'] . '&amp;#160;' . 'DKK' . "&lt;/td&gt;"; 
              } 
              else{ 
              echo "&lt;td&gt;" . 'No donations in DB' . "&lt;/td&gt;"; 
              } 
              echo "&lt;/tr&gt;"; 
              }
  }
  ?&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I have set up a test site here where you can see it <a href="http://clanroyal.dk/hof_test.php" rel="nofollow">http://clanroyal.dk/hof_test.php</a></p>
  
  <p>now what I want is for rank 1 to have the gold medal next to his name rank 2 the silver and rank 3 the bronze.</p>
  
  <p>Im totally clueless about this one, so any help would really be appreciated</p>