Re: urlencode - urldecode

From: Date: Mon, 09 Aug 2004 00:56:24 +0000
Subject: Re: urlencode - urldecode
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-193156@lists.php.net to get a copy of this message
PHP Gen wrote:
// sending file: $one=rawurlencode("dir_name=$dir_name&imgs_dir=$imgs_dir&thumb_pre=$thumb_pre&tn_width=$tn_width&tn_height=$tn_height&write_text=$write_text&colors=$colors&x_pos=$x_pos&y_pos=$y_pos&link1=$link1&link2=$link2&link3=$link3&img_src1=$img_src1&img_src2=$img_src2"); header("location: process.php?a=".$one); Am totally confused as to how to use urldecode to get back my values to do other operations in my script..
You don't have to decode it on the other end. Everything as you've got above (that whole string) will be in $_GET['a'] on process.php. Since you asked, though, you use urldecode() like this: $decoded = urldecode($_GET['a']); That's a lot of information to be sending through the URL, btw. I think there's a max of 1024 characters, generally, although each browser is different. Just something to note. Maybe sessions would be better? -- John Holmes php|architect - The magazine for PHP professionals - http://www.phparch.com

« previous php.general (#193156) next »