|
-
May 4th, 2006, 10:22 PM
#1
Thread Starter
Fanatic Member
Cookie Problem!
http://www.questfor3d.com/loginscript.php
Warning: Cannot modify header information - headers already sent by (output started at /home/content/d/a/m/damasterjo/html/loginscript.php:3) in /home/content/d/a/m/damasterjo/html/loginscript.php on line 88
line 88
setcookie("UsersName", $NName, time()+604800);
$NName is proper
Software languages known:
Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
Software API's known:
Directx 7 and 8
Internet languages, in the process of learning:
HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX
-
May 4th, 2006, 11:43 PM
#2
Re: Cookie Problem!
Cookies have to be set before anything else has been written on your page.
do you echo anything before you set your cookie?
-
May 5th, 2006, 05:49 AM
#3
Re: Cookie Problem!
Line 88 is fine but as Lintz says you cannot send any data before the headers and a cookie is a header.
Look at the error message again:
(output started at /home/content/d/a/m/damasterjo/html/loginscript.php:3)
The highlighted bit tells you where the data is being sent, you need to correct that bit.
-
May 5th, 2006, 06:09 AM
#4
Addicted Member
Re: Cookie Problem!
No Matter Where I set the cookie, it gives me mod header information. So stupid, anyway, if you see this Damasterjo, I moved all the scripts into a subdir "phptest" so for the scripts:
http://www.questfor3d.com/phptest/phptest.php
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|