Good day,

I've had to do something similar to this.

I do not think there is a way to do this with only HTML- you either need to
use a header like the one shown, or a META tag, and they have to be written
right away.

I worked around this once with Javascript.  The page had an ONLOAD function
that would look on the page for a URL (stored as a hidden input element) and
then try to go there if the input element had any data in it.  This works
nicely since you don't actually have to write this data with PHP until
you're ready to close your <BODY> tag.  Then, when the page is loaded, the
ONLOAD triggers and does its work.

I don't have the code on me, but this should be a good enough push in the
right direction.

Hope this helps,

============================
Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-----Original Message-----
From: Andrea Caldwell [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 18, 2002 2:19 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] how to send to URL on if statement?


Sorry,  I'm new at this...

I have already sent output... any way to do this?

Thanks again,
Andrea

"Ing. Daniel Manrique" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Can anyone advise or direct me to the documentation that references how
to
> > send a user to a URL if an 'if' statement is satisfied?
>
> Assuming you hadn't sent any output before:
>
> if ($condition){
> header("Location: http://wherever.com";);
> exit;
> }
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to