Re: how do i get a variable in a second php document

From: Date: Wed, 27 Dec 2000 15:08:43 +0000
Subject: Re: how do i get a variable in a second php document
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-4678@lists.php.net to get a copy of this message
At 13:57 27.12.2000 +0100, dulidel the programmer wrote:
i want to link with an <a href >-Teg to a second php document and i need a variable in the second php document of the first one. how do i get this variable in the second document without session variables and how do i get several variables in the second document
cookies, or get (if the query string will not grow orbitant) <? $array = array("bar", 1, "foo"); $string = "foo"; printf("<a href=\"url.php?array=%s&string=%s\">", urlencode(serialize($array)), urlencode(serialize($string))); ?> using only the variable content is imo not a good solution. remeber it's by far better to use sessions, since the content doesn't pass the trustboundary (it's held on the server and not on the client, where it could be modified) daniel /*-- daniel beulshausen - daniel@php4win.de using php on windows? http://www.php4win.de

« previous php.windows (#4678) next »