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]
Header Information
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
If you had bother to read the rules you would have known to search the forums. You will find this of interest
click here
click here