lilman Posted November 21, 2006 Share Posted November 21, 2006 Other than using header, does anyone know of a redirect script using PHP? Link to comment https://forums.phpfreaks.com/topic/27920-php-redirect/ Share on other sites More sharing options...
lilman Posted November 21, 2006 Author Share Posted November 21, 2006 Or is there a way I can use a PHP variable in a javascript redirect like:I do not know much about javascript so bear with me please. If I have this JS code[code]window.location="<?php echo $URL; ?>";[/code] Link to comment https://forums.phpfreaks.com/topic/27920-php-redirect/#findComment-127697 Share on other sites More sharing options...
hitman6003 Posted November 21, 2006 Share Posted November 21, 2006 To use only PHP:[code]header("location: nextpage.php");[/code]Javascript:[code]<?phpecho '<script type="text/javascript">window.location.href = "nextpage.php";</script>[/code]Or use a meta refresh tag with a time of 0; Link to comment https://forums.phpfreaks.com/topic/27920-php-redirect/#findComment-127707 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.