RE: [PHP-DB] Passing ARRAY through URL

From: Date: Sat, 08 Feb 2003 01:46:04 +0000
Subject: RE: [PHP-DB] Passing ARRAY through URL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-25516@lists.php.net to get a copy of this message
> Help. I've tried to pass large array through URL but it keep telling me > page > can not be displayed: If you get "page not found" then it's not an issue with your code. Does page2.php really exist? What does the URL look like when it says page cannot be found? Is this a PHP or HTML error that you get? > <? // page1.php > $mList = arrary(); ^^^^ assuming this is a typo > ... // fill array with values > $mList = urlencode( serialize( $mList ) ); > header( "location: page2.php?mL=$mList" ); To be entirely correct, it should be "Location" with a capitol L, and a full URL (not relative) as the address. > ?> > > <? // page2.php > $mList = stripslashes( unserialize( $mL ) ); Reverse this. Stripslashes() first, then unserialize(). > print_r( $mList ); > ?> ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.db (#25516) next »