Or, alter your page's structure so that it writes its output into a 
buffer, and echo/print it at the end of the page. That way you can
do the redirect at any point it's needed within the page logic.

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"Work now, freak later!"

> -----Original Message-----
> From: webapprentice [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 27, 2002 4:25 PM
> To: Rasmus Lerdorf
> Cc: James; Jason Murray; [EMAIL PROTECTED]
> Subject: Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's
> location tag?
> 
> 
> Hi Mr. Lerdorf,
> I look forward to you upcoming O'Reilly PHP book. =)
> 
> Yes, a META tag refresh or Javascript control seems to be the 
> only way left.
> Strange that URL redirection is so unusual to implement in 
> PHP compared to
> ASP or Coldfusion (unless they do something klunky under the hood).
> 
> Anyway, I also noticed that when the manual says you cannot 
> output ANYTHING,
> I found out that if I close out all my spaces in the PHP page 
> by tightening
> the php container tags, I will not output anything first.  I 
> forgot that
> even whitespace would be considered a web page and would generate http
> headers (since the PHP processor probably translates whitespace as
> echo/print statements).
> 
> Thanks.
> 
> --Stephen
> 
> ----- Original Message -----
> From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> To: "webapprentice" <[EMAIL PROTECTED]>
> Cc: "James" <[EMAIL PROTECTED]>; "Jason Murray"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, March 27, 2002 12:01 AM
> Subject: Re: [PHP] Any PHP equivalent of Macromedia 
> ColdFusion's location
> tag?
> 
> 
> > So use a Javascript meta-refresh
> >
> > On Wed, 27 Mar 2002, webapprentice wrote:
> >
> > > Hi,
> > > Thanks for the reply.  I saw this as well in the mailing 
> list archives,
> but
> > > everyone is saying you cannot output ANYTHING before 
> calling header.
> > >
> > > Unfortunately, I'm calling this at the end of a process, 
> so it won't
> work.
> > > It tells me I've already sent out header information.
> > >
> > > I've basically created a single PHP page with a form.  
> When the form is
> > > submitted, it submits to itself.  It checks if the form 
> is submitted,
> and
> > > then goes to mail the contents to someone.  After 
> mailing, I want to go
> to a
> > > Thank You page.  I want to get away from this PHP page, 
> because I don't
> want
> > > a person refreshing the page and causing the PHP page to 
> submit again.
> > >
> > > Thus, is there something else I can do?  Or am I just not 
> seeing this?
> > >
> > > Thanks,
> > > Stephen
> > >
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "James" <[EMAIL PROTECTED]>
> > > To: "webapprentice" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, March 26, 2002 10:20 PM
> > > Subject: Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's
> location
> > > tag?
> > >
> > >
> > > > header("Location: http://www.google.com";);
> > > > replace that url with the page you want it to go to
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to