![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Aug 2006
Posts: 23
OS: Windows XP?
|
PHP, cookies, signing in
So I was trying to work on a very simple sign in script for my site, so they can either sign in as a teacher or student, and it checks the appropriate password, and sets a cookie. Having some problem though. I keep getting this message whenever I try to set the cookie(Line 255 is the line the setcookie is on):
Warning: Cannot modify header information - headers already sent by (output started at urlstuffhere/index.php:6) in urlstuffhere/index.php on line 255 PHP Code:
Last edited by Dustyshouri; 09-12-2006 at 11:39 PM. |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Registered User
Join Date: Aug 2006
Posts: 23
OS: Windows XP?
|
Okay, scratch that bit. I fixed that problem, didn't know the cookie script had to be set before the html tag... anyways, still having problems. It's just not setting the cookie at all. It won't give an error, I've even taken scripts directly from tutorial sites and tried them and they aren't working. I don't have cookies blocked either.
|
|
|
|
|
|
#3 (permalink) |
|
Retired
|
I'm not much of a PHP buy, more ASP than anything, but I'm going to take a shot in the dark:
where you're setting your cookie, you don't have the "$" before "user". It seems to me that when calling a variable, you need to call it how it is set. But I don't know anything about php so forgive me if I'm wrong.
__________________
|
|
|
|
|
|
#4 (permalink) |
|
Design Team
Join Date: Mar 2006
Location: Philadelphia
Posts: 1,541
OS: Windows Vista Home Premium (x64)
|
Please post the source code for index.php so that I can find out exactly what is going wrong.
__________________
Nice music blog ![]() Nvu || Notepad++ || Apache || PHP || Keep TSF Alive "The great thing about a computer notebook is that no matter how much you stuff into it, it doesn't get bigger or heavier." |
|
|
|
![]() |
| Thread Tools | |
|
|