note 94686 deleted from function.urlencode by danbrown

From: Date: Wed, 18 Nov 2009 15:21:04 +0000
Subject: note 94686 deleted from function.urlencode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-163035@lists.php.net to get a copy of this message
Note Submitter: DN ---- urlencode and rawurlencode are highly unreliable since browsers interpret everything differently, particularly the & symbol. If you want a no-nonsense way to safely encode a string to be passed as a GET variable, I recommend using... ............Sending page............ <?php $encodedString = base64_encode($complexString); echo "<a href=\"?var=".$encodedString."\">Text</a>"; ?> ............Receiving page............ <?php $decodeString = base64_decode($_GET["var"]); ?>

« previous php.notes (#163035) next »