TheFilmGod Posted January 16, 2008 Share Posted January 16, 2008 <? // Rediret Address $redirect = $_SESSION['url']; // Redirect them back header( 'Location: "$redirect"' ) ; ?> $reidirect is printed as "$redirect" and not what its variable stands for. Quote Link to comment https://forums.phpfreaks.com/topic/86236-header-redirect/ Share on other sites More sharing options...
Ell20 Posted January 16, 2008 Share Posted January 16, 2008 My guess would be: <? // Rediret Address $redirect = $_SESSION['url']; // Redirect them back header( 'Location: $redirect' ) ; ?> Quote Link to comment https://forums.phpfreaks.com/topic/86236-header-redirect/#findComment-440474 Share on other sites More sharing options...
KrisNz Posted January 16, 2008 Share Posted January 16, 2008 its because you have it in single quotes which treats everything inside it as a literal string. it should be header( "Location: $redirect" ) ; Quote Link to comment https://forums.phpfreaks.com/topic/86236-header-redirect/#findComment-440476 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.