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/ Quote Link to comment 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); ?> Quote Link to comment Share on other sites More sharing options...
RockinPurdy Posted December 3, 2007 Author Share Posted December 3, 2007 ya that's what I have Quote Link to comment Share on other sites More sharing options...
trq Posted December 3, 2007 Share Posted December 3, 2007 That does what you want. Quote Link to comment 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 Quote Link to comment 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.