php header() function

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have 2 questions :

1 - How to launch a sheet S2 from a sheet S1 ?

We have to is the header() function or do there is something else ? Like
"Run S2" ?

header("Location:../users/admin.php"); ??

2 - What is the exact functionality of header() and how ton use it ?

I get this error :

Warning: Cannot modify header information - headers already sent by (output
started at c:\program
14) in c:\program
on line 40

Thank you.


Re: php header() function

On Thu, 04 Aug 2005 16:28:18 +0200, mail1_fr wrote:

Quoted text here. Click to load it

Hi to you too. Don't multi-post

    JDS | jeffrey@example.invalid

Re: php header() function


Quoted text here. Click to load it

Re: php header() function

Quoted text here. Click to load it

That's one way.  However, you cannot modify the headers once you have
printed any HTML.  As soon as you print the first HTML, PHP sends all of
the HTTP headers it has accumulated.  After that, it's too late.

Quoted text here. Click to load it

HTTP responses are formatted exactly like e-mail messages.  There is a set
of HTTP headers, followed by a blank line, followed by a body, which is
usually a bunch of HTML.

header() adds to the list of HTTP headers that PHP will send at the start
of the response.  When the first HTML is sent, PHP flushes the whole set of
headers.  After that, they're gone.

Quoted text here. Click to load it

I'm guessing line 40 of that file prints some HTML.  If you really need to
redirect the browser to another page, you need to figure that out before
you send any HTML.
- Tim Roberts,
  Providenza & Boekelheide, Inc.

Site Timeline