Help: First Time Form with Sessions
| From: | Stuart Felenstein | Date: | Fri, 08 Oct 2004 13:23:09 +0000 |
| Subject: | Help: First Time Form with Sessions | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-36686@lists.php.net to get a copy of this message | ||
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