Can anyone tell me why the following setcookie()s fail? <?php require("settings.php"); require("common.php");
if (!($link = mysql_connect($dbhost, $dbuser, $dbpass))) { ReportError("An error was encountered while trying to establish a connection to the mySQL server, using function mysql_connect(), with..\r\n Hostname: $dbhost \n Username: $dbuser \n Password: $dbpass \r\n A possible problem is that the hostname/username/password is incorrect, or the mySQL server is down."); } if (!(mysql_select_db($dbname, $link))) { ReportError("An error was encountered while trying to select the mySQL database '$dbname', using funcion mysql_select_db().\r\nA possible problem is that the specified database '$dbname' does not exist."); } $find_user = mysql_query("SELECT `user_id` FROM `users` WHERE `name` = '$username' AND `password` = '$password'"); if (mysql_num_rows($find_user) == 1) { $title = "Hello, $username!"; $message = "Thanks for logging in! You can now use our forums, add comments and add Tabs/Lyrics."; $uid = mysql_fetch_row($find_user); $expDate = mktime(12, 50, 30, 6, 20, 2010); setcookie("tzusercookie", $uid, $expDate); setcookie("tzpasscookie", $password, $expDate); } else { $title = "There was an error logging you in"; $message = "Could not log you in, check the username and password you entered and try again."; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <?php include("templates/$template/styles.css"); ?> <title><?php echo($title); ?> - Tabzilla.com</title> <META http-equiv=Content-Type content="text/html; charset=ISO-8859-1"> </head> <body> <?php include("templates/$template/head.php"); ?> <br> <table width="100%" cellspacing="0" cellpadding="0" bgcolor="white" border="0"> <tr><td width="20%" valign="top"><?php include("lnav.php"); ?></td><td width="60%"> <table width="95%" align="center" bgcolor="#CFCFCF" height="30"><tr><td><b><?php echo($title); ?></b></td></tr></table> <br> <table width="95%" cellspacing="0" cellpadding="1" border="0" align="center"> <tr> <td> <?php echo($message); ?> </td> </tr> </table> </td> <td width="20%" valign="top"><?php include("rnav.php"); ?></td></tr></table> <?php include("footer.php"); ?> </body> </html> -- ----------------------------- [EMAIL PROTECTED] http://www.cool-palace.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php