Posted: Fri Jul 27, 2007 9:24 am
hey Jim , somethin to keep in mind is that when you use session_start()
it will pass Sesisons to the next page, but only if on the firts page, if those were set as a sessions
example $_SESSION['widget'] ;
but when you use a FORM that the user submits it isnt making them sessions yet. because they dont exist until user submits form.
Then , your second page has to read something like this:
Pretend one of the inputs was for the user to input their name on page one.
You couldnt use $_SESSION['name'] on page 1.
Because it wont exist when that page loads, not until user submits that form .
when it goes to page two . you want to have something to converted that POST data to a session
like this :
your form on page one will have to be method="post" or "get" if you want to send it that way .
But on form submits and user input data , the Session cant exist until it is 1. submitted to next page. (becomes a $_POST variable)
2. you convert it to sessions.
its a simple thing like a roller skate laying on a stair , important to realize that the $_POST and $_SESSION tactics
it will pass Sesisons to the next page, but only if on the firts page, if those were set as a sessions
example $_SESSION['widget'] ;
but when you use a FORM that the user submits it isnt making them sessions yet. because they dont exist until user submits form.
Then , your second page has to read something like this:
Pretend one of the inputs was for the user to input their name on page one.
You couldnt use $_SESSION['name'] on page 1.
Because it wont exist when that page loads, not until user submits that form .
when it goes to page two . you want to have something to converted that POST data to a session
like this :
Code: Select all
$_SESSION['name'] = $_POST['name'];But on form submits and user input data , the Session cant exist until it is 1. submitted to next page. (becomes a $_POST variable)
2. you convert it to sessions.
its a simple thing like a roller skate laying on a stair , important to realize that the $_POST and $_SESSION tactics