|
Posted by Oli Filth on 06/02/05 21:46
Peter Van Hove said the following on 02/06/2005 19:36:
> Hi,
>
> inside html, before <head>, you can put something like this :
>
> <script type="text/javascript">
> self.location.replace(www.url.com/newpage.htm);
> </script>
>
> which basically instructs the browser to start loading another page asap
> (www.url.com/newpage.htm);
> This has some limitations, especially when the user has restricted use of
> java etc.
>
Please note, there is an *enormous* difference between Java and
Javascript! They are not related in any way. You are talking about
Javascript.
> Is there a way to do this in PHP ?
> like, if there is a link to link.php, this page then starts loading
> www.url.com/newpage.htm instead ?
>
If you use:
header("Location: http://example.com/blurgh.htm");
before *any* other script output, then this will redirect the user's
browser. Note that the URL *must* be absolute, i.e. you cannot simply
use something like /blurgh.htm.
--
Oli
[Back to original message]
|