Forum Moderators: coopster

Message Too Old, No Replies

question about $ GET['url']

         

drooh

4:16 am on Mar 21, 2008 (gmt 0)

10+ Year Member



I am trying to pass a string accross a url such as
note.php?type=stuff&id=33

the problem I am having is that the contents of the $_GET['return_url'] are cut off at the &.

My question is there a way to get everything after return_url=

login.php?return_url=http://www.webmasterworld.com/read_cookie.php?id=1&f=1

eelixduppy

4:24 am on Mar 21, 2008 (gmt 0)



You have to encode the URL query to specification in order to get that, otherwise it becomes part of the URI itself. The following would do what you want:

login.php?return_url=http%3A%2F%2Fwww.webmasterworld.com%2Fread_cookie.php%3Fid%3D1%26f%3D1

If you are generating this URL from php, then you may want to take a look at urlencode [php.net]

vincevincevince

6:34 am on Mar 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use the variable $_SERVER[QUERY_STRING] - it's all in there!