View previous topic :: View next topic |
Author |
Message |
scearezt Cheater
Reputation: 0
Joined: 12 Feb 2011 Posts: 46
|
Posted: Sun Mar 27, 2011 10:35 am Post subject: [PHP] Headers |
|
|
Cannot modify header information - headers already sent
I've made a login engine, and I've got this message when I tried to login with one of the accounts. It's a really frequent problem in PhP.
I can't solve it, becouse I need one of the prints before this header... Also I've tried the:
Code: | action"<?php echo $_SERVER['PHP_SELF']; ?>" |
But it looks like the page wont refreshing itself, 'Cuz I need a header into my PhP.
Any suggestions? Idea?[/b]
|
|
Back to top |
|
 |
Innovation Grandmaster Cheater
Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
|
Back to top |
|
 |
scearezt Cheater
Reputation: 0
Joined: 12 Feb 2011 Posts: 46
|
Posted: Sun Mar 27, 2011 11:06 am Post subject: |
|
|
I know! I've already looked for it! But I still can't solve it as I said: "I need one of the prints before this header".
I need a way to make multiple headers...
|
|
Back to top |
|
 |
Innovation Grandmaster Cheater
Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
Posted: Sun Mar 27, 2011 11:52 am Post subject: |
|
|
scearezt wrote: | I know! I've already looked for it! But I still can't solve it as I said: "I need one of the prints before this header".
I need a way to make multiple headers... |
A header is only sent once. You can't change it once it's already sent, since it precedes all of the content.
|
|
Back to top |
|
 |
scearezt Cheater
Reputation: 0
Joined: 12 Feb 2011 Posts: 46
|
Posted: Sun Mar 27, 2011 12:20 pm Post subject: |
|
|
I already know that... then how can I refresh the included file without refreshing the whole page
|
|
Back to top |
|
 |
Deltron Z Expert Cheater
Reputation: 1
Joined: 14 Jun 2009 Posts: 164
|
Posted: Sun Mar 27, 2011 12:47 pm Post subject: |
|
|
Why would you need to print anything before headers? perhaps what you are looking for is ajax?
_________________
SharpDisassembler
"When I find my code in tons of trouble,
Friends and colleagues come to me...
Speaking words of wisdom:
Write in C."
#pragma message("Let there be byte!") |
|
Back to top |
|
 |
Innovation Grandmaster Cheater
Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Mar 27, 2011 2:33 pm Post subject: |
|
|
Care to go into a bit more detail as to what you are trying to accomplish overall? You said you made a login system, but what are you attempting to do that is causing this issue to happen? You also shouldn't be 'refreshing' include files, that's not the point of PHP. And things like that should be handled client sided.
_________________
- Retired. |
|
Back to top |
|
 |
|