Hi Stu
1. why not check it on every page, then if it fails the user won't need to make it to the end and then have to go back to the beginning to fix something minor.
2. You could use hidden fields to pass the data back and for or just use a session, otherwise the variables expire on that page
$fieldname1 = $_REQUEST['fieldname1']; //check field name for data correctness (regex or however you want to)
$_SESSION['user_input']['fieldname1']=$fieldname1; ... $_SESSION['user_input']['fieldname3']=$fieldnameN;
The above is a 2-d array, that way if you are using other session vars, you won't get confused when deciding which one holds the data that you need.
hth
bastien
From: Stuart Felenstein <stuart4m@xxxxxxxxx> To: php-db@xxxxxxxxxxxxx Subject: Help: First Time Form with Sessions Date: Fri, 8 Oct 2004 06:23:09 -0700 (PDT)
Okay , so I'm working on the multi page form. Insert into DB will come at the last page. Couple of things I want to confirm:
1-Each page should have validiation for each field. Probably doesn't make any sense to wait for last page ? or maybe ?
Below is the first page of the form: I only have the echo statements in there now to check and make sure the variables were taking from the form fields. Question though - when I go onto the next page, do I need to echo the variables to retain the values or just keep the variables listed ? In other words as I continue through the next form pages, do I need to echo the previous ones ?
<?php session_start(); $ListingName = $_REQUEST['ListingName']; $AltP1 = $_REQUEST['AltP1']; $AltP2 = $_REQUEST['AltP2']; $Pgr = $_REQUEST['Pgr']; $El2 = $_REQUEST['El2']; $El3 = $_REQUEST['El3']; ?> <?php echo "\$ListingName = ".$ListingName."<br/>"; echo "\$AltP1 = ".$AltP1."<br/>"; echo "\$AltP2 = ".$AltP2."<br/>"; echo "\$Pgr = ".$Pgr."<br/>"; echo "\$El2 = ".$El2."<br/>"; echo "\$El3 = ".$El3."<br/>"; ?>
Thank you , Stuart
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________
Take charge with a pop-up guard built on patented Microsoft® SmartScreen Technology http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*.
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php