Help:Multi Page form using session variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I cant figure out if I'm doing something wrong or my
web server is:
I have a multi page form that will span 5, now I'm
just trying to get it too 3 pages working. 
If I go from Page 1 direct to Page 3, then the
variables print out fine on Page 3. If I go Page 1
then Page 2 and then to Page 3, only Page2 variables
print out on 3.

I must be missing something ?


Page1: excerpt:

<?php
session_start();
?>

<?php
print "<p>Welcome, your session ID is
".session_id()."</p>\n\n";
?>

<div>
<form name="form1" id="form1" method="post"
action="TestMulti2.php">
  <table width="419" border="1" align="center"
cellpadding="2" cellspacing="2">
    <tr>
      <td width="227"><div align="right">Listing
Name</div></td>
      <td width="172"><input name="ListingName"
type="text" id="ListingName" value="<?php echo
$_SESSION['ListingName']; ?>"></td>
  
Page 2:

<?php
session_start();

if ( empty( $_SESSION['l_industry'] ) ) {
$_SESSION['l_industry']=array();
}

if ( is_array( $_REQUEST['LurkerIndustry'] ) ) {
$_SESSION['l_industry'] = array_unique(
array_merge( $_SESSION['l_industry'],
 $_REQUEST['LurkerIndustry'] )
);
}
if ( empty( $_SESSION['l_tterm'] ) ) {
$_SESSION['l_tterm']=array();
}

if ( is_array( $_REQUEST['LurkerTaxTerm'] ) ) {
$_SESSION['l_tterm'] = array_unique(
array_merge( $_SESSION['l_tterm'],
 $_REQUEST['LurkerTaxTerm'] )
);
}
?>

Page 3:

<?php
session_start();
?>
<?php
print "<p>Welcome, your session ID is
".session_id()."</p>\n\n";
?>

<?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/>"; 
echo "\$LurkerEdu = ".$LurkerEdu."<br/>";
echo "\$LurkerAuth = ".$LurkerAuth." <br/>"; 
echo "\$LurkerExperience = ".$LurkerExperience."
<br/>"; 
echo "\$LurkerLevel = ".$LurkerLevel." <br/>"; 
echo "\$LurkerSecurity = ".$LurkerSecurity." <br/>"; 
echo  $LurkerIndustry['0']."<br />"; 
echo  $LurkerIndustry['1']."<br />";
echo  $LurkerIndustry['2']."<br />"; 
echo  $LurkerIndustry['3']."<br />";
echo  $LurkerIndustry['4']."<br />"; 
echo  $LurkerTaxTerm['0']."<br />";
echo  $LurkerTaxTerm['1']."<br />"; 
echo  $LurkerTaxTerm['2']."<br />";
?>


Thank you
Stuart

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux