I'm running a pretty basic script for a project a work, I have a database with a load of contacts in and I need the script to pull through the results and display a basic table, I had the script working but all of a sudden its now not pulling through any database info this is the code i'm using:
<?php
$con=mysqli_connect("localhost","root","password","main");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM users");
echo "<table border='1'>".
"<tr><th>ID</th>".
"<th>Rating</th>".
"<th>Name</th>".
"<th>Discipline</th>".
"<th>Rate</th>".
"<th>Location</th>".
"<th>Number</th>".
"<th>Email</th>".
"</tr>";
while($row = mysqli_fetch_array($result));
{
echo "<tr>";
echo "<td>" . $row['ID'] . "</td>";
echo "<td>" . $row['Rating'] . "</td>";
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['Discipline'] . "</td>";
echo "<td>" . $row['Rate'] . "</td>";
echo "<td>" . $row['Location'] . "</td>";
echo "<td>" . $row['Number'] . "</td>";
echo "<td>" . $row['Email'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>
if anyone any point me in the right direction that would be really great thank you.
EDIT: released I'd copied an older code that I was debugging with and didn't include the fetch_array.