hi all,
PHP-4.03pl
LINUX 7.0
i am still having problems with sessions. the following does nothing but
should appear to do something! it is just a simple experiment to test that
sessions work. session_test.php calls session_proc.php to perform one of
three functions.
i would really appreciate any help as this is driving me nuts. i have also
tested this on other systems to no avail.
many thanks in advance,
christian
------------- session_test.php ------------------------------------------
<html>
<body>
<?
if(is_array($count))
{
reset ($count);
while (list($key, $value) = each ($count)) {
echo "Key: $key; Value: $value
Count:".count($value)."<br>\n";
if(is_array($value))
{
reset ($value);
while (list($key2, $value2) = each ($value)) {
echo "---> Key: $key2; Value: $value2 <br>\n";
}
}
}
}
print "<br> <br>".count($count)."
---".session_is_registered("count");
?>
<form name=test method=post action=session_proc.php>
<input name=increment type=submit value=increment><input name=reset
type=submit value=reset><input name=decrement type=submit value=decrement>
</form>
</body>
</html>
------------- session_proc.php ------------------------------------------
<?
session_start();
session_register("count");
$count = array();
if(isset($increment))
{
$count[0] = 9;
$count[1] = 11;
$count[2] = 12;
}
if(isset($reset))
{
unset($count);
}
if(isset($decrement))
{
$count[0] = 4;
$count[1] = 6;
$count[2] = 1;
}
header("location: session_test.php");
exit;
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]