Curt, Thanks. That was the issue. Am I allowed to redirect directly below the setcookie functions using "header ('Location...."
Thanks, Ryan ================================================================== -----Original Message----- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 3:29 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] setcookie statements are giving me error * Thus wrote Ryan Schefke ([EMAIL PROTECTED]): > > cannot modify header errors, which tells me there's nothing wrong with my > main script. Am I doing something wrong with cookies here? > > "Warning: Cannot modify header information - headers already sent by....." You're missing the most important part of the message, like at exactly what line the output started. > > setcookie ("acctActive_ck", "$daysRemaining"); //set cookie for active > account, will terminate when browser window closes > if (setcookie("acctActive_ck")) { echo "active cookie set"; } else { echo > "active cookie not set";} No other cookie can be set after this line. Headers are sent once you echo something. Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php