SA-MP Forums Archive
<PHP> Modify Header error. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: <PHP> Modify Header error. (/showthread.php?tid=163046)



<PHP> Modify Header error. - Carlton - 25.07.2010

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?


Re: <PHP> Modify Header error. - Fj0rtizFredde - 25.07.2010

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


Re: <PHP> Modify Header error. - vital2k - 25.07.2010

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


Re: <PHP> Modify Header error. - Carlton - 25.07.2010

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


Re: <PHP> Modify Header error. - vital2k - 25.07.2010

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


Re: <PHP> Modify Header error. - Carlton - 25.07.2010

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