Forum Moderators: coopster
http://www.example.com/login.php?timeout=1&ref=http://www.example.com/page.php
This is so that the login page has a referring URL to redirect the user to after they log in. I am using urlencode() to encode the ref parameter in the query string, but I am running into problems when there are ampersands involved.
For example, if the referral URL was http://www.example.com/page.php?id=person&name=dude&age=24, the urlencode() will remove all parameters after the first (id).
Basically, I can't find a way of keeping ampersands in a parameter when there's ampersands already in the query string. So ideally, I want this (but with the ref parameter encoded):
http://www.example.com/login.php?timeout=1&ref=http://www.example.com/page.php?id=person&name=dude&age=24