> -----Original Message-----
> From: David Banning [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 27, 2003 2:15 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] redirect using header
> 
> 
> I have been trying to do a redirect with header;
> 
> <HTML>
> <HEAD>
>    <TITLE>Optex Staging and Services Inc. </TITLE>
> </HEAD>
> <BODY>
> <?php
> header('http://newwebpage.com');
> ?>
> <H3>
> <FONT COLOR="#3333FF">Stand By For Terminal...</FONT></H3>
> 
> </BODY>
> </HTML>

If you want to send output before the re-direct you need to use
javascript.

<body
onLoad="setTimeout(location.href='http://mywebdomain.com/index.html',100
00");">
This will execute right after the page is completely loaded and move to
the next page after 10 seconds. If javascript is disabled this will not
work, so provide a link in that case to be clicked on.

You can also use the meta tag:

<meta http-equiv="refresh" content="10; URL=index.php">

<body>
Hello there
</body>
Since <meta> starts counting when page is first accessed (as opposed to
when the page is comepletly loaded), people with slow connection might
not see the message -- depending on how big things are.

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

Reply via email to