Header Information

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
n0rmal
Forum Newbie
Posts: 1
Joined: Sun Dec 12, 2004 3:08 pm

Header Information

Post 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]
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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
Post Reply