Re: An easier way? $_POST[] => $_SESSION[]
| From: | Jason Wong | Date: | Tue, 02 Nov 2004 02:18:08 +0000 |
| Subject: | Re: An easier way? $_POST[] => $_SESSION[] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200853@lists.php.net to get a copy of this message | ||
On Monday 01 November 2004 17:43, Erich Kolb wrote:
> Is there an easier way to assign all post data from a form to session data?
>
> Eg.,
>
> $_SESSION['first_name'] = $_POST['first_name'];
> $_SESSION['last_name'] = $_POST['last_name'];
>
> $_SESSION['email'] = $_POST['email'];
Name your form elements like so:
form[first_name]
form[last_name]
Then:
$_SESSION['form'] = $_POST['form'];
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
The shortest distance between any two puns is a straight line.
*/