Jump to content

Manipulate GET


unemployment

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.