View Single Post
Old 07-01-2007, 5:10 PM   #5
Richard
 
Richard's Avatar
 
Posts: n/a
My Photos: ()

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Header warnings??? Why??

Phil Powell wrote:>>

> // REDIRECT THEM BACK TO LOGIN
> if ($hasSubmittedUsername) {
> header("Location: http://$SERVER_NAME/fslogin.php?errorMsg=" .
> urlencode($font . '<font color=000099><li>Password
> emailed</li></font></font><p>') .
> '&username=' . urlencode($username));
> }


> ?>


> <html>
> <head>
> <title><?= $brand ?> Login: Forgot Password</title>


> Based on this code snippet (and there is nothing being written to the
> headers prior to header("Location.."), why am I getting the following:


> Warning: Cannot add header information - headers already sent by (output
> started at /home/youth/finesocceryouthsessions-www/fsforgot.php:15) in
> /home/youth/finesocceryouthsessions-www/fsforgot.php on line 114


> The line is the header() line. Furthermore, instead of being redirected
> to fslogin.php I am still at fsforgot.php! Can someone help me quickly,
> I'm on a tight deadline!


> Thanx
> Phil


Might have a nested tag open somewhere.
I was encountering a similar problem with some coding and when I had enough
close tags, the error went away.
The process continues working it's way down the ladder until it receives an
end point.
If no end point is reached and it passes through more coding, you get the
error.
Which happens a lot in javascript when you have script below the body of the
html. The process runs over into the lower coding and encounters the error.



  Reply With Quote