I'm going crazy here. Trying to do a simple login... but it doesn't know the difference whether the username/password is right or not. I've tried everything and I'm going insane.
Here's a chopped version of the code.
<?
//snipped connection code
//click login button
if(isset($_POST['mybutt'])) {
//variables are login posts
$user = $POST['user'];
$pass = $POST['pass'];
$log = 1;
//if variables are correct...
$test = mysql_query("SELECT * FROM login WHERE user==$user AND pass==$pass",$db);
if($test) {
//then set cookie
setcookie("sfauser", $user, time()+80000);
} else {
echo "Your username/password was incorrect."
}