Well, it was working, but it's giving me problems once again. Here's my code:
$user = mysql_real_escape_string($_GET['user']);
$qstr = "SELECT * from users WHERE user=$user";
echo ($qstr);
$result = mysql_query($qstr) or die(mysql_error());
if (mysql_num_rows($result)>0)
{
$email = mysql_result($result,0, "email");
}
else
{
$email = '';
}
If I echo $qstr I get the error:
SELECT * from users WHERE user=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1