I have created a 16 page form and I need a session to keep all the variables in scope until the end, when I send them out in an email.
I do session start on the first page and a session start on the following pages while registering the variable from the previous page (for example):
<?
// start the session
session_start();
header("Cache-control: private"); //IE 6 Fix
// Get the user's input from the form
$LoanPurpose = $_POST['L32'];
// Create a new Session Value
session_register('L32');
// Register the input with the value
$_SESSION['L32'] = $LoanPurpos
In this way, I register the session and the variables that were defined in the previous page, that would be textbox name "L32".
On my links to other pages within the form, do I have to do the following (for example a link in a list of links would be):
<option value="declarations.php?session=<?php echo $sess_id ?>">Declarations</option>
Do I need to do this for each link? Or can just place a link without the php code attached to it and start a session at the top of the linked page?
Any help is greatly appreciated