unemployment Posted January 25, 2012 Share Posted January 25, 2012 I need to be able to pull this URL in my form action: /login?onlogin=http://domain.com/messaging?action=read&cid=130&utm_source=new_message&utm_medium=email&utm_campaign=direct_mesage_link I need everything after "/login?onlogin=" but when I do: if (isset($_GET['onlogin'])) { echo $_GET['onlogin']; die(); } It only returns http://domain.com/messaging?action=read and I need it to return the entire URL. How can I achieve this? Link to comment https://forums.phpfreaks.com/topic/255782-manipulate-get/ Share on other sites More sharing options...
codebyren Posted January 25, 2012 Share Posted January 25, 2012 Well, the URL parameters are being split by the presence of "&" in the URL. So, it's breaking at where &cid=130 kicks in and adding "cid" as a new URL parameter (same with &utm_source etc.). If you need to pass this kinda info in the URL, you will need to look at http://php.net/manual/en/function.urlencode.php and its urldecode counterpart. Link to comment https://forums.phpfreaks.com/topic/255782-manipulate-get/#findComment-1311200 Share on other sites More sharing options...
unemployment Posted January 25, 2012 Author Share Posted January 25, 2012 Yeah, that's what I had to use to make this work. Thanks Link to comment https://forums.phpfreaks.com/topic/255782-manipulate-get/#findComment-1311202 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.