I’m trying to make it so that this code shows however many rows there are that match up with the owner. The owner that I’m using to test currently has three items but only one of the items shows up. How can I make it so that it displays all of the owner’s items?
<?php
$username = $_SESSION['username'];
$get = @mysql_query("SELECT * FROM items WHERE owner = '$username'");
$row = mysql_fetch_assoc($get);
$check = mysql_num_rows($get);
if($check == 0)
echo "You have no items in your inventory.";
while($row = mysql_fetch_assoc($get))
{
echo "<p>Item Name:" . $row['name'] . "</p></br>";
}
?>
Do it like this