Re: setting sessions in a form
- From: "Mumia W." <mumia.w.18.spam+nospam.usenet@xxxxxxxxxxxxx>
- Date: Tue, 22 Aug 2006 08:57:11 GMT
On 08/21/2006 04:22 PM, christopher.j.just@xxxxxxxxx wrote:
I'm just starting to use session with my forms in an attempt to lock
down some of the less secure issues with global variables and such.
However, I'm having trouble getting the variables to return.
The form process is pretty basic - a simple registration form with a
number of fields that passes to an intermediate page where there is an
opportunity to update incorrect information and then a final move to a
confirmation page.
Previously I had used hidden includes to move data from one page to
another but I would prefer a more elegant solution by using session. I
know that I set the session_start();, but am not sure on what page and
how to retrieve the information stored. I'm looking for the absolute
beginner starting point and I can build off that, but I'm a bit lost at
the moment.
Thanks for any help,
Chris
I'm something of a newbie to php too, but I think that, after session_start() is called, this should work:
$_SESSION['myform'] = $_POST;
Everything in the form would be stored in the 'myform' element of the session.
.
- References:
- setting sessions in a form
- From: christopher . j . just
- setting sessions in a form
- Prev by Date: Re: 2 dimension array have a max lenght ?
- Next by Date: PHP + GD with jpeg and ttf enabled on FreeBSD 5.3 and Apache 1.3
- Previous by thread: setting sessions in a form
- Next by thread: Re: setting sessions in a form
- Index(es):
Relevant Pages
|