At 11:22 23/4/2001 +1000, Jason Murray wrote:
> > Is there any PHP native function to redirect to another page or URL?
>
>No, because you can only redirect a browser to another page using the
>appropriate HTTP command (it is a header) or JavaScript.
>
> > I would like that once the user clicks on home.php4 and a few
> > verifications are done, he/she would be redirected to home.html.
>
>You can issue a HTTP redirection command to the web browser by using
>PHP's Header() function. You'll want to use this kind of code:
>
><?
>    Header("Location:
>http://this.is.the.destination.com/directory/file.php");
>?>

I never had any trouble using header() to redirect, but wouldn't something 
like this work even better (without worring about previous outputs)??

function redirect($dest)
{
         ?>
         <script language="JavaScript">
                 parent.location.href='<?=$dest?>';
         </script>
         <?
}

it would work wouldn't it?

____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


-- 
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