RockinPurdy Posted December 3, 2007 Share Posted December 3, 2007 Hey, How can I change the header location so that it changes to what is specified in a variable? Eg. $link = "http://google.com/" header('Location: '.$link) This changes the URL to ...../$link where i want it to just be http://google.com/ Link to comment https://forums.phpfreaks.com/topic/80018-solved-header-location/ Share on other sites More sharing options...
trq Posted December 3, 2007 Share Posted December 3, 2007 <?php $link = "http://google.com/"; header('Location: '.$link); ?> Link to comment https://forums.phpfreaks.com/topic/80018-solved-header-location/#findComment-405429 Share on other sites More sharing options...
RockinPurdy Posted December 3, 2007 Author Share Posted December 3, 2007 ya that's what I have Link to comment https://forums.phpfreaks.com/topic/80018-solved-header-location/#findComment-405437 Share on other sites More sharing options...
trq Posted December 3, 2007 Share Posted December 3, 2007 That does what you want. Link to comment https://forums.phpfreaks.com/topic/80018-solved-header-location/#findComment-405440 Share on other sites More sharing options...
RockinPurdy Posted December 3, 2007 Author Share Posted December 3, 2007 Hm that is so weird. It wasn't working before but I messed around with a few things and changed it back to that and now it works ??? Haha thanks Link to comment https://forums.phpfreaks.com/topic/80018-solved-header-location/#findComment-405449 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.