title: Php/Mysql search returning only 1 result when there is more
body: <p>I have a double search that happens within the script. When it searches for a players gear, it will take the player UID and bring back the name of that player. The only issue is that there may be more than 1 result that will return and it will only display the last UID with the name.</p>
  
  <pre><code>$ip = "localhost";
  $user = "******";
  $pass = "*******";
  $db = "hivemind";
  $ill1 = $_POST['search'];
  
  //Database Connection
  $con = @mysql_connect("$ip:3316", "$user", "$pass")
              or die(mysql_error());
  
  //Select Database
  $dbcon = @mysql_select_db($db, $con)
              or die(mysql_error());
  
  $sql = mysql_query("select PlayerUID, Inventory, Backpack from character_data where Inventory like '%$ill1%'");
  
  while ($row = mysql_fetch_array($sql)) {
      $puid = $row['PlayerUID'];
      $inv = $row['Inventory'];
      $back = $row['Backpack'];
      ?&gt;
      &lt;html&gt;
      &lt;body&gt;
      &lt;table&gt;
      &lt;tr&gt;
  
                      &lt;td&gt;&lt;?php echo "$puid"; ?&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;?php echo "$inv"; ?&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;?php echo "$back"; ?&gt;&lt;/td&gt;
  
      &lt;/tr&gt;
      &lt;/table&gt;
      &lt;/body&gt;
      &lt;/html&gt;
      &lt;?php }?&gt;
  
      &lt;?php
  
  //Database Connection
  $con = @mysql_connect("$ip:3316", "$user", "$pass")
              or die(mysql_error());
  
  //Select Database
  $dbcon = @mysql_select_db($db, $con)
              or die(mysql_error());
  
  $sql = mysql_query("select PlayerUID, PlayerName from player_data where PlayerUID like '%$puid%'");
  
  while ($row = mysql_fetch_array($sql)) {
  
      $puid2 = $row['PlayerUID'];
      $plnm = $row['PlayerName'];
      ?&gt;
      &lt;html&gt;
      &lt;body&gt;
      &lt;table&gt;
      &lt;tr&gt;    
                      &lt;td&gt;&lt;?php echo "$puid"; ?&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;?php echo "$plnm"; ?&gt;&lt;/td&gt;
  
  
      &lt;/tr&gt;
      &lt;/table&gt;
      &lt;/body&gt;
      &lt;/html&gt;
       }
  </code></pre>