Error in Login of My website
I host my website through Awardspace. Every thing is ok but when I am login as admin or user I am getting a warning which is "Warning: Cannot modify header information - headers already sent by (output started at /srv/disk8/1065242/www/gadgetsolution.co.cc/include/header.php:2) in /srv/disk8/1065242/www/gadgetsolution.co.cc/login.php on line 21". If any one can help me help me.................
Some where before the header statements, you're echoing out some data. You can't do that.
No data can be sent before headers. See: http://us.php.net/manual/en/function.header.php
You can use ob_start & ob_flush to buffer the output so that you can send data before headers.
Either fix the echo that's being sent before the header or put ob_start at the very beginning of the php file and at the very end of the php file.
some times there is a white space from an include file that can cause this ie.
?> . . . . . <===== trailing white space
"water go down the hole" - plucky duck
Note that session_start() and setcookie() send HTTP headers, not to mention the header() function, of course.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread