[PHP] urlencode - urldecode

2004-08-08 Thread PHP Gen
Hi,
I am using a header(location:) to send a
rawurlencod'ed string to another script...then I tried
decode it and use those values...but its not
working...

snippets of my code: 

// sending file:
$one=rawurlencode(dir_name=$dir_nameimgs_dir=$imgs_dirthumb_pre=$thumb_pretn_width=$tn_widthtn_height=$tn_heightwrite_text=$write_textcolors=$colorsx_pos=$x_posy_pos=$y_poslink1=$link1link2=$link2link3=$link3img_src1=$img_src1img_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..

I tried the example from php.net: (example 1)
http://se2.php.net/manual/en/function.urldecode.php

but am unable to adapt it to give me my
variables/values.


The reason I am using rawurlencode is because $link1
and $link2 will contain html tags...

Thanks for your time.
-Mag

=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)



__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



Re: [PHP] urlencode - urldecode

2004-08-08 Thread John Holmes
PHP Gen wrote:
// sending file:
$one=rawurlencode(dir_name=$dir_nameimgs_dir=$imgs_dirthumb_pre=$thumb_pretn_width=$tn_widthtn_height=$tn_heightwrite_text=$write_textcolors=$colorsx_pos=$x_posy_pos=$y_poslink1=$link1link2=$link2link3=$link3img_src1=$img_src1img_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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] urlencode - urldecode

2004-08-08 Thread PHP Gen Newbie
Hi,

Thanks again John, point taken...will not trust the
browser, will use sessions :-)

Cheers,
-Mag



--- John Holmes [EMAIL PROTECTED] wrote:

 PHP Gen wrote:
 
  // sending file:
 

$one=rawurlencode(dir_name=$dir_nameimgs_dir=$imgs_dirthumb_pre=$thumb_pretn_width=$tn_widthtn_height=$tn_heightwrite_text=$write_textcolors=$colorsx_pos=$x_posy_pos=$y_poslink1=$link1link2=$link2link3=$link3img_src1=$img_src1img_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
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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