0

im trying to make a simple page where i display a few entrys from a DB. Here's the code:

<?php 

$conn = new mysqli ('localhost', 'root','pw', 'mybd');

if ($conn->connect_error) {
    die("Connection failed");
}

$result = $conn->query("SELECT plate FROM transactions");

    if (result->num_rows > 0)
    {
        while ($row = $result->fetch_assoc())
        {
         echo $row ['plate'];
        }
    }


?>

the prolblem is when i run this i got

http error 500

.

Pedro Costa
  • 427
  • 3
  • 13
  • 31

0 Answers0