php-windows Digest 18 Nov 2004 17:56:27 -0000 Issue 2473

Topics (messages 24992 through 24996):

Redirecting A Webpage
        24992 by: Allen D. Tate
        24993 by: Charles P. Killmer
        24994 by: Larry E. Ullman
        24995 by: paul.garcia.mchsi.com
        24996 by: Felipe Alcacibar

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message --- I would like to setup an index.php file to redirect to another .php file as soon as it is invoked, like [response.redirect] does in Active Server Pages. Does anyone know this cammand off the top of their head? Thanks in advance. :)
--- End Message ---
--- Begin Message ---
header("Location: http://www.google.com";); 
or
header("Location: /otherfile.php"); 


-----Original Message-----
From: Allen D. Tate [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 18, 2004 9:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Redirecting A Webpage

I would like to setup an index.php file to redirect to another .php file
as soon as it is invoked, like [response.redirect] does in Active Server
Pages. Does anyone know this cammand off the top of their head? Thanks
in advance. :)

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

--- End Message ---
--- Begin Message ---
I would like to setup an index.php file to redirect to another .php file as soon as it is invoked, like [response.redirect] does in Active Server Pages. Does anyone know this cammand off the top of their head? Thanks in advance. :)

use the header() function. header ("Location: http://www.site.com/otherpage.php";); exit;

Larry
--- End Message ---
--- Begin Message ---
i use javascript such as:
<head>
<script language="JAVASCRIPT">
  function changePage()  {
         location = "http://www.whereever.com/nextpage.php";
  }
</script>
</head>

<body>
  <script language="JAVASCRIPT">
    setTimeout("changePage()",10000)
  </script>
</body>

the setTimeout function waits for 10 seconds (10,000 milliseconds) before 
redirecting.  i have some standard html code on the site that says something 
about "this webpage has been changed, please update your bookmark, blah, blah, 
you will be redirected momentarily."

hth


> I would like to setup an index.php file to redirect to another .php file 
> as soon as it is invoked, like [response.redirect] does in Active Server 
> Pages. Does anyone know this cammand off the top of their head? Thanks 
> in advance. :)
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
To redirect a page, you can use this 3 methods...

php:
the header function:

header("Location: some_page.php");

html:
the meta tag:

<meta http-equiv="refresh" content="0; url=some_page.php">

javascript:
the location.href property

<script language="javascript" type="text/javascript">
location.href='some_page.php';

// also you can refresh by seconds

window.setTimeout('location.href="some_page.php";', 600); // 6
secs....refresh to some_page.php
</script>

good luck... x)



"Allen D. Tate" <[EMAIL PROTECTED]> escribi� en el mensaje
news:[EMAIL PROTECTED]
> I would like to setup an index.php file to redirect to another .php file
> as soon as it is invoked, like [response.redirect] does in Active Server
> Pages. Does anyone know this cammand off the top of their head? Thanks
> in advance. :)

--- End Message ---

Reply via email to