Page 1 of 1

Header Information

Posted: Sun Dec 12, 2004 3:13 pm
by n0rmal
Hey, im very new to php and im trying to do a tutorial that I found in a book. My error comes when you try and access a page that is suppost to be restricted to everyone that is not logged in. If you are not logged in, it is for some reason showing the page anyways, and giving an error, itstead of forwarding you to a new page.

This is the error
їcode]Warning: Cannot modify header information - headers already sent by (output started at /home/mwift/www/pet/useraccess.php:139) in /home/mwift/www/pet/useraccess.php on line 19

Warning: Cannot modify header information - headers already sent by (output started at /home/mwift/www/pet/useraccess.php:139) in /home/mwift/www/pet/useraccess.php on line 20
ї/code]

And this is the code
їcode] setcookie('asdfemail', $email);
setcookie('asdfpassword', $password);ї/code]

The code comes from a function that is called in the top of the erroring page, i call it with require auth.php. thanks.[/quote]

Posted: Sun Dec 12, 2004 3:16 pm
by John Cartwright
If you had bother to read the rules you would have known to search the forums. You will find this of interest

click here