Thread: PHP redirecting
View Single Post
Old 04-17-2007, 01:03 PM   #3 (permalink)
synergy
synergy's Avatar
 
Monster Techie

Join Date: Mar 2005

Location: Somewhere between a 1 and a 0

Posts: 1,677

synergy will become famous soon enoughsynergy will become famous soon enough

Send a message via MSN to synergy Send a message via Yahoo to synergy Send a message via Skype™ to synergy
Default Re: PHP redirecting

You can use php for other stuff and insert javascript into the page for the redirect.

For instance this is a page I did that redirects after showing the results of a contact form:

PHP Code:
<?php
bunch of php code here
<script Language="JavaScript">
  <!--

       var 
URL   "http://www.mysite.com"
       
       
var speed 3000

       
function reload(){

       
location URL

       
}

       
setTimeout("reload()",speed);

  
//-->
</script>

<p><strong>Redirecting in 3 seconds <br />
Click <a href="http://www.mysite.com">here</a> if you would not like to wait </strong></p>
<p> </p>

<?php 
}
?>
var URL is the link you want to redirect to
var speed is how long it will take (ms, 3000=3 secs, 5000=5 secs, etc.)
__________________

Windows 7 Professional 64-bit
HTPC: Phenom II X4 920 | Biostar TA790GX XE mATX w/ ATI HD 3300 IGP | 4 GB Dominators DDR2 1066
LG Blu-Ray/HD-DVD ROM + DVD RW | WD Caviar 1 TB | 250 GB Cuda | Antec Veris Fusion Black HTPC Case
Logitech diNovo Edge KB | Win7 Pro 64-bit

3dMark06 23,159 | 3dMark Vantage 23,579 | TF2 Stats Page

Last edited by synergy; 04-17-2007 at 01:06 PM.
synergy is offline