I am working on a small project for myself that keeps track of some history for me. I am receiving an error that the result is returning with a boolean. Below is the code that I am using
$result = mysqli_query($con,"SELECT formService, formMilage, formdate from clientcarhistory");
echo "<table border='1'>
<tr>
<th>Service Type</th>
<th>Car Milage</th>
<th>Service Date</th>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['formService'] . "</td>";
echo "<td>" . $row['formMilage'] . "</td>";
echo "<td>" . $row['formDate'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
I've tested the sql query within mysql and it returns the proper results in the table. However, when I try to access the table via the code above it returns with the error.
Any help given would be greatly appreciated.