preserve value of session
Posted: Tue Jul 22, 2008 9:43 pm
I have a lot of textboxes, check boxes in my form and I got already all the values using session. This form containing 4 pages. In my first page after the user fill up the form then go to the succeeding pages. In every pages I want to preserve the values of the form in array so that I can retrieve the values and display it after completion of all the forms.
The code below putting the values in array but when I call this array to display the value after the completion of the form, it was result nothing.
Please help me and advice. I am a newbie with this environment.
Thanks in advance
session.php
The code below putting the values in array but when I call this array to display the value after the completion of the form, it was result nothing.
Please help me and advice. I am a newbie with this environment.
Thanks in advance
Code: Select all
<?
session_start();
$arval = array();
require_once("../include/session.php");
reset ($_POST);
while(list($key, $val) = each ($_POST))
{
if ($val == "")
$val = "NULL";
$arVals[$key] = (get_magic_quotes_gpc()) ? $val : addslashes($val);
}
?>Code: Select all
$arVals = array("monthdatebenifit"=>"", "daydatebenifit"=>"", "yeardatebenifit"=>"");