I'm getting this error when trying to create the category links in part two in the dynamics of the footer.html file:
An error occurred in the script '/hermes/bosweb/web037/b372/ipg.mbenavides/testing/INCLUDES/footer.html' on 43:
Array
(
[0] => Array
(
[function] => my_error_handler
[args] => Array
(
[0] => 2
[1] => mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given
this is the code I'm using per the book:
<?php
$q = 'SELECT * FROM categories ORDER BY category';
$r = mysqli_query($dbc, $q);
while (list($id, $category) = mysqli_fetch_array($r, MYSQLI_NUM)) {
echo '<li><a href="category.php?id=' . $id . '" title="' . $category . '">' . $category . '</a></li>';
}
?>
I have tried a ton of stuff to correct this, any suggestions?