------------------------------------- <form name="Downloadphpscript and Justdialclone"> <center> <font face="Arial"><b>You will be redirected to the script in<br><br> <form> <input type="text" size="3" name="redirect2"> </form> seconds</b></font> </center> <script> <!-- /* Count down then redirect script By JavaScript Kit (yourwebsitename) Over 400+ free scripts here! */ //change below target URL to your own var targetURL="yourwebsitename" //change the second to start counting down from var countdownfrom=10 var currentsecond=document.redirect.redirect2.value=countdownfrom+1 function countredirect(){ if (currentsecond!=1){ currentsecond-=1 document.redirect.redirect2.value=currentsecond } else{ window.location=targetURL return } setTimeout("countredirect()",1000) } countredirect() //--> </script> ------------------------------
I am not sure what you are looking for ... If you are trying to redirect using php function, you can make use of the header function as header("location:url"); PHP: If you are trying to use js then its possible using window.location=url; Code (markup): But in your code I cant find a place where you call the js function either.
Furthermore, I think he wants a way to redirect upon a countdown but in php, which can be achieved with html (which is more reliable than js). http://webdesign.about.com/od/metataglibraries/a/aa080300a.htm
still, the best way is to use HTML Meta <HTML> <HEAD> … <META HTTP-EQUIV="refresh" CONTENT="seconds;URL=the-other-url"> … </HEAD> <BODY> … </BODY> </HTML> PHP: