Why won't it echo the database?


Well if I take this out of the file:Jackolantern wrote:If even your test echo is not printing, that means your WHILE loop isn't running. I would start investigating there to see what you are actually getting into the $row. If $row is empty the first time the WHILE runs, it will be skipped.
Code: Select all
while ($row = mysqli_fetch_array($user_query, MYSQLI_ASSOC)) {Code: Select all
echo "<tr align='left'><td><img src = '".$row['image']."'height='100' width='100'></td><td>$row[name]</td><td>$row[strength]</td><td>$row[defense]</td><td>$row[price]</td><td><A href='buy_item.php?randid=$row[randid]'><font color='red'>Buy Item</font></td></tr>";