I think I'm going to lose my mind! This script is so simple, and I don't know where the problem is. I don't have the luxury of error reporting, and globals are turned on. Its just a simple form with this script as the action and "post" as the method.
require_once('Connections/Connection.php');
mysql_select_db($database_Connection, $Connection);
$query_result = "SELECT * FROM access WHERE userName='$userName' AND password='$passWord'";
$result = mysql_query($query_result, $Connection) or die(mysql_error());
$num = mysql_numrows($result);
if ($num != "0"){
setcookie("gsi_logged", "YES", time()+86400*120);
header ("Location: [url]http://www.xxxxxxxxxx1.php[/url]");
}
else {
header ("Location: [url]http://www.xxxxxxxx.php[/url]");
}
Somebody please help me!!!