<PHP> Modify Header error.
#1

Hey, i'm getting this unexpected error for a while now that several known experienced PHP coders couldn't help me with either. This is my last resort, which is the forum.

I'm getting a modify header error which is below:

Quote:

Warning: Cannot modify header information - headers already sent by (output started at MyUrl: in MyUrlPage.php on line 31

This error is known to come only if you set cookies inside the html tag! But it is not in the html tag!

- Fixed, code removed.

The reason for $Account is not for it to get inside the tags. The error lines come from MySQL connect (Inside MySQL.php) and Setcookie, which is found at the bottom. I tried removing the data from the includes and pasting it inside but the error still occurred. Also the beginning tag <html> is found inside ScriptBegin.php. Any clues?
Reply
#2

I used to have this problem too I found a link that helped me. Hope that its going to help you too http://www.daniweb.com/forums/thread88479.html
Reply
#3

When using the header(); function in PHP, it must go before any HTML is output and PHP.
Reply
#4

Quote:
Originally Posted by vital2k
View Post
When using the header(); function in PHP, it must go before any HTML is output and PHP.
Re-read my post, and read it carefully.

@Fj0rtizFredde didn't work
Reply
#5

Ah okay my bad XD. When you input the wrong password, does the same error still appear?
Reply
#6

Fixed, I removed my comments, etc.. and it worked, thank you for helping anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)