note 46742 deleted from function.base64-encode by sean
| From: | sean@php.net | Date: | Thu, 21 Oct 2004 21:12:38 +0000 |
| Subject: | note 46742 deleted from function.base64-encode by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78911@lists.php.net to get a copy of this message | ||
Note Submitter: ramsosa at hotmail dot com
----
<?
//If you have problems passing a variable that have an & in his value by method get in a url
// Author: ramsosa@yahoo.com
//
function decode_get(){
if (isset($_GET)){
foreach($_GET as $k=>$v) $_GET[$k]=base64_decode($_GET[$k]);
}
}
function create_link_vars($href,$title,$_URL){
foreach($_URL as $k=>$v) $_URL_tmp[]="$k=".base64_encode($v);
echo "<a
href='$href?".implode('&',$_URL_tmp)."'>$title</a>";
}
decode_get();
echo '<pre>';
print_r($_GET);
echo '</pre>';
$_URL['RFC']="&SORR720831";
$_URL['REC']="&SORR720831299299";
$_URL['Name']="RAMON&SOSA&REYES";
create_link_vars('testgeturl.php','Click Here',$_URL);
?>
----
Reason: bad code