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

From: Date: Wed, 24 Apr 2002 22:37:32 +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-94464@lists.php.net to get a copy of this message
Thanks Miguel, 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. > On Wed, 24 Apr 2002, Pushkar Pradhan wrote: > > I am collecting some data on a page - test.php, ($layer which is an array > > of names). > > If checkbox is checked that user wants to change drawing order, I should > > redirect the browser to page - "updateHTML.php" which has necessary script > > to do that. > > I achieved redirection using header(), but can't pass the $layer array > > with it. > > I tried something like: > > form.. > > input type hidden layer... > > header() > > but then the page isn't redirected since I get a warning that headers have > > been sent before the execu. of this line. > > What is the way to do this? I don't want to do include since it will put > > the contents of both the scripts on the same page. > > header('Location: updateHTML.php?layer=' > . urlencode(serialize($layer))); > > and then inside updateHTML.php > > $layer = unserialize($_REQUEST('layer')); > > miguel > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -Pushkar S. Pradhan

« previous php.general (#94464) next »