I'm trying to set a cookie after a user logs in. The login form brings the user to this page where I set the cookie, but it keeps giving me a parse error on the setCookie line. Here's the code, could someone explain to me what I'm doing wrong?

<?php
#Connect to database here

$expire = time() + (3600 * 24 * 180);
$path = "/";
$domain = ".mydomain.com";

$query = "SELECT USERNAME, PASSWORD FROM MEMBERS";
$query .= " WHERE USERNAME = '$USER' AND";
$query .= " PASSWORD = '$PWORD';

$user_result = mysql_query($query);

$num_users = mysql_num_rows($user_result);

$memb = 12345;

if ($num_users == 0)) {
echo 'Authorization Required!\n';
echo 'Hit reload to try again.';
exit;
} else {

setcookie ("id", $memb, $expire, $path, $domain, 0);

}
?>

thanks in advance,
kankohi