Hello i have tryed many ways to get this to work am unsure where my error is. i get the Error message.
mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
This is the Code:
$dbh = mysqli_connect("HOST", $user_name, $password, $database_name);
if (!$dbh)
{
die("Not connected : " . mysqli_error($dbh));
}
if ($method=="graces")
{
$query = "SELECT id, name FROM raceslog";
$userinfo = array();
while ($row_user = mysql_fetch_assoc($query)){
$userinfo[] = $row_user;}
foreach ($userinfo as $user) {
echo "^{$user[id]}"
. "^{$user[name]}";
}
}
Well my question is does anyone see where my error is and could point me in the right direction to fix Thank You.