hi all,

will urlencode($QUERY_STRING) be sufficient enough conversion of the query
string to enable me to pass the query string around as a var in the url?


current script: page.php?var1=foo&var2=bah

$script = $_SERVER['PHP_SELF'];
$ref = urlencode($script.$qs);

<A HREF="email_a_friend.php?ref=$ref">email this page to a friend</a>

Then on email_a_friend.php I can urldecode() the $ref, so that I now the
file and query string of the referring page.

I guess I'm worried that urlencode may not sufficiently obscure the old
query string, which may cause confusion on the second script.

Any suggestions?  This is basically a way of me ensuring I have a referring
url, since HTTP_REFERER isn't always set my the browser.


Justin French

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to