I'm making a website so once your logged in it goes to your profile but once you log in it gives me this error. Unknown column 'tom' in 'where clause' Tom is the username. it don't tell me which line but im pretty sure its this one.
$result = queryMysql("SELECT * FROM profiles WHERE user=`$user`");
quertyMysql is defined in another file.
function queryMysql($query)
{
global $connection;
$result = $connection->query($query);
if (!$result) die($connection->error);
return $result;
}
is this enough code for anyone to tell me whats doing wrong?