[thelist] php sessions

John Corry webshot at members.evolt.org
Mon Apr 22 17:06:01 CDT 2002


I feel really dumb for not being able to figure this out...

I have a site where you fill out a form, it submits to itself for error
correction, if there are no errors, the action attribute is changed to
submit to the next form.

On form 2, I take all the $_POST vars and register that array as a session
variable:
session_register('ship_to');
$ship_to = $_POST;

So...from that page, I can click a link and my session is continued (i see
the sessid in the status bar and in the URL of the page I visit.

I go back to form 1

On form 1, I:
foreach ($HTTP_SESSION_VARS['ship_to'] as $key => $value)
			{
			$key = $value;
			$output .= "i did it!<br>\n";
			}

What I'm doing here is assigning all the variables the values they were
given when the form was submitted. Since all the form element's values are
the same as their names:
<input type="text" name="ship_to_name" value="<?= $ship_to_name?>">

I expect the form to be filled in already, but it isn't.

Can anyone help me figure out what I'm missing?

thanks,
john




More information about the thelist mailing list