first off start the session by using the code below. This code MUST be placed at the very top of the page and MUST be present in every page you use to collect/present data.
PHP Code:
session_start(); // starts the session header("Cache-control: private"); // fix for IE 6
For the wizard process, you will need to use headers to redirect the user to the required pages. Using conditional statements will be the best way to go.
PHP Code:
if(isset($newnote)) { header("Location: newnote.php") }
Then just use HTML or PHP to display a text box and press another button to return to the original page with the data intact i.e. using an echo statement.
To destroy the session, use the following code:
PHP Code:
$_SESSION = array(); session_destroy(); header("Location: http://www.mydomain.com/");
Last edited by cerebro89; 12-26-2005 at 07:56 AM..
|