Re: SESSIONizing Post form vars
| From: | Scott Hurring | Date: | Tue, 30 Jul 2002 19:22:44 +0000 |
| Subject: | Re: SESSIONizing Post form vars | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15023@lists.php.net to get a copy of this message | ||
(untested, since i don't use PHP's native sessions -- i wrote my own
wrapper) but this should work:
$HTTP_SESSION_VARS['post'] = $_POST;
or
$HTTP_SESSION_VARS['request'] = $_REQUEST;
if you're trying to get all the POST vars as "first-level" keys of
$HTTP_SESSION_VARS, it doesn't seem like the best thing
in the world (i would keep them separate). array_merge()
will probably do what you want... or a simple loop:
while (list($k,$v) = each($_POST))
$HTTP_SESSION_VARS[$k] = $v;
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
"R.S. Herhuth" <ronherhuth@pop.mindspring.com> wrote in message
news:3D46E306.97EB119@pop.mindspring.com...
>
> Is there a quick way to add all of the vars in the $_POST[] array to the
$HTTP_SESSION_VARS[]?
>
> I suppose a loop would do the trick.
>
> Ron