RE: [PHP] carrying a query string

From: Date: Thu, 06 Jun 2002 05:23:26 +0000
Subject: RE: [PHP] carrying a query string
Groups: php.general 
Request: Send a blank email to php-general+get-100886@lists.php.net to get a copy of this message
try it and see if it doesn't work, try using base64_encode() and base64_decode() after all, you're not encrypting the string, just making sure the script handles it okay, ay? -----Original Message----- From: Justin French [mailto:justin@indent.com.au] Sent: Thursday, June 06, 2002 3:21 PM To: php Subject: [PHP] carrying a query string 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? eg current script: page.php?var1=foo&var2=bah <? $script = $_SERVER['PHP_SELF']; $qs = $_SERVER['QUERY_STRING']; $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. Thanks, Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#100886) next »