So, I am getting this error:
Fatal error: Call to a member function fetch_assoc() on a non-object
And it says the error is on line 220.
Which line 220 is:
while ($field = $result->fetch_assoc()) {
$result:
$tbl_name = "savage";
$sql = "SELECT * FROM $tbl_name LIMIT $start, $limit ORDER BY `id` DESC";
$result = $mysqli->query($sql);
I'm not sure if it is because $tbl_name is in a variable or what, but I haven't got an idea of how to fix this. Might be a simple answer, but hopefully you can help! Let me know if I need to provide more!
Forgot to include:
$limit = 10;
if(isset($_GET['page'])) {
$page = $_GET['page'];
$start = ($page - 1) * $limit;
} else {
$page = 0;
$start = 0;
}
In this case $_GET['page'] is not set.