Re: client redirection
| From: | Scott Mebberson | Date: | Wed, 18 Oct 2000 07:38:16 +0000 |
| Subject: | Re: client redirection | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20816@lists.php.net to get a copy of this message | ||
What about if I want to write a successfull message to the client and then
bounce them back to a "menu" page?
Can I then use the meta data in the middle of the page??
"David Robley" <huntsman@hermes.nisu.flinders.edu.au> wrote in message
news:0010181801320A.11640@hermes...
> On Wed, 18 Oct 2000, Scott Mebberson wrote:
> > I think that you can use some sort of $HTTP_REDIRECT method maybe(?!?!?)
to
> > redirect the user to a different page. but I understand that this is
only
> > before the header has been sent to the client page.
> >
> > What about if you want to redirect the user only if certain conditions
> > exist. What happens then. I have though of using meta data to do this,
but
> > can meta data be put anywhere in the page? Doesn't it have to be put in
the
> > <head></head> section of the html?
> >
> > Is there any PHP redirect method ie
> > /user_redirect("http://www.whereiwant.com");
> >
> > this would be pretty good. Maybe I am asking for too much.
> >
> > thanks
> >
> > scott.
>
> header("Location: http://www.whereiwant.com")
>
> is what you want, in conjunction with some sort of decision structure at
> the beginning of your script, before you output _anything_ to the client,
> even white space. There is also some sort of output buffering in later
> versions of PHP - ob_start and friends. A search on buffer at your local
> mirror au.php.net:81/ will turn them up.
>
> --
> David Robley | WEBMASTER & Mail List Admin
> RESEARCH CENTRE FOR INJURY STUDIES |
> http://www.nisu.flinders.edu.au/
> AusEinet |
> http://auseinet.flinders.edu.au/
> Flinders University, ADELAIDE, SOUTH AUSTRALIA
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>