I'm trying to simply get all the data from a mysql table using the following code:
$dbc = mysqli_connect('host', 'user', 'password', 'table');
$q = 'SELECT * FROM users';
$r = mysqli_query($dbc, $q);
$user_array = array();
while ($row = mysql_fetch_array($r))
{
$user_array[]=$row;
}
echo "<br />";
echo "print r of user_array: <br />";
print_r($user_array);
i'm getting nothing. I looked at this tutorial (http://www.w3schools.com/php/php_mysql_select.asp), among others, but all they do is confuse me.
What am I doing wrong?