I have encountered an interesting problem that I have no idea how to fix. I was creating my website on XAMPP, where it works fine. But once it was uploaded to the server, a portion of my php code is simply not being executed. I placed echo statements throughout the code to determine why my php function stopped, and this statement here seems to be the issue - $row_id = mysqli_fetch_all($r, MYSQLI_ASSOC);
There is an earlier database pull that goes like this -
$id = $_SESSION['admin_id'];
$q = "SELECT user_id FROM adminsofusers WHERE admin_id = $id";
$r = mysqli_query($dbc, $q) or trigger_error("Query: $q
<br> MySQL Error: " . mysqli_error($dbc));
I have tried running a mysqli_num_rows() on $r and it returns as 1, which it should, so I have determined that the issue lies with
$row_id = mysqli_fetch_all($r, MYSQLI_ASSOC);
Everything after this statement is disregarded, and anything put in the php script after it does not matter. It is still working fine on my local server, however. Any ideas? Likely a problem with my hosting server?