Re: redirect to new page and pass variables too? (fwd)

From: Date: Thu, 25 Apr 2002 20:00:00 +0000
Subject: Re: redirect to new page and pass variables too? (fwd)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94646@lists.php.net to get a copy of this message
I'm trying to do urlencode/urldecode: my $layer[] contains: aban_railroads, airport_runways2001, blk_grps this is what IE shows in my address window when I do the redirection: http://..../updateHTML.php?layer=a%3A3%3A%7Bi%3A0%3Bs%3A14%3A%22aban_railroads%22%3Bi%3A1%3Bs%3A19%3A%22airport_runways2001%22%3Bi%3A2%3Bs%3A8%3A%22blk_grps%22%3B%7D It means that these 3 elements are there, however I tried both 1. unserialize($layer) 2. urldecode(unserial...) inside updateHTML.php but still I get: Warning: Invalid argument supplied for foreach() in /rstc/user1/erc/pushkar/gis/mcrgdl/updateHTML.php on line 68 This is how I do redirect: header("Location: http://".$HTTP_SERVER_VARS['HTTP_HOST'].dirname($HTTP_SERVER_VARS['PHP_SELF'])."/".$relative_url ."updateHTML.php?layer=" . urlencode(serialize($layer)) ); What could be wrong? > > I was just reading urlencode.php, shouldn't the complementary function be > > urldecode() like the document. says, > > well unserialize must be working too, I believe you. > > I'm pretty sure the urldecoding happens automatically. If you get funny > results then it's worth sticking it in to see what happens. > > miguel > -Pushkar S. Pradhan

« previous php.general (#94646) next »