sphinx Posted October 3, 2010 Share Posted October 3, 2010 Hi i was using the code below to redirect user when a link like. www.site.com/?redirect was clicked, instead how do i add things to the page like "html code goes here" instead of the header? <?php $link ='http://www.whereitredirectstoo.co.uk'; if (isset($_GET['redirect'])) header('Location: ' . $link); ?> thanks Link to comment https://forums.phpfreaks.com/topic/215043-content-instead-of-redirect/ Share on other sites More sharing options...
sphinx Posted October 3, 2010 Author Share Posted October 3, 2010 solved, but i forgot how to make html inside echo's work? echo "<meta http-equiv=\"REFRESH\" content=\"5;url=google.com\">\" Link to comment https://forums.phpfreaks.com/topic/215043-content-instead-of-redirect/#findComment-1118552 Share on other sites More sharing options...
BlueSkyIS Posted October 3, 2010 Share Posted October 3, 2010 i prefer to use single quotes for all tag values, but if you prefer to use double-quotes, your echo should work except for the missing semi-colon on the end. Link to comment https://forums.phpfreaks.com/topic/215043-content-instead-of-redirect/#findComment-1118554 Share on other sites More sharing options...
Pikachu2000 Posted October 3, 2010 Share Posted October 3, 2010 And un-escape that last quote . . . Link to comment https://forums.phpfreaks.com/topic/215043-content-instead-of-redirect/#findComment-1118555 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.