Re: How do I set Session Variables
- From: "Lupus" <mathieu.maes@xxxxxxxxx>
- Date: 22 Aug 2006 06:41:15 -0700
Dear Chris,
First of all you need to initialize the session :
session_start();
You have to do this on every page during the session. I'm not sure, but
it's possible that you have to put this in the script before any
output...
After that, the session variables are stored in the array $_SESSION[] :
session_start();
$_SESSION['foo'] = "bar";
---- next page ----
session_start();
echo $_SESSION['foo'];
kind regards,
Mathew
christopher.j.just@xxxxxxxxx wrote:
I'm starting with a form that has 23 fields and I need to be able to
pass and recall the information from page to page as people move
through the form process.
How do I set the variables to include all the form elements and how do
I recall them in each subsiquent page.
Previously we had been using hidden includes, but we're looking for a
more elegant and consistant solution.
Thanks,
Chris
.
- References:
- How do I set Session Variables
- From: christopher . j . just
- How do I set Session Variables
- Prev by Date: PHP + GD with jpeg and ttf enabled on FreeBSD 5.3 and Apache 1.3
- Next by Date: Re: PHP + GD with jpeg and ttf enabled on FreeBSD 5.3 and Apache 1.3
- Previous by thread: How do I set Session Variables
- Next by thread: PHP + GD with jpeg and ttf enabled on FreeBSD 5.3 and Apache 1.3
- Index(es):
Relevant Pages
|