No idea if this will help, but not sure why you are serializing the array...
// sessionarray.php4
session_cache_limiter("");
session_start();
session_register('name');
session_register('city');
session_register('state');
session_register('postcode');
session_register('pagecount');
if (pagecount != "") {
$name[] = $newName;
$city[] = $newCity;
$state[] = $newState;
$postcode[] = $newPostcode;
}
?>
<html>
<head>
</head>
<body>
<form method="post" action="<? echo $PHP_SELF; ?>">
Enter a name:
<input type="text" name="newName"><br>
Enter a city:
<input type="text" name="newCity"><br>
Enter a state:
<input type="text" name="newState"><br>
Enter a postcode:
<input type="text" name="newPostcode"><br>
<input type="submit" name="submit" value="enter values" >
</form><br>
<br>
<?
for ($i = 0; $i < count($name); $i++) {
echo "<B> $name[$i] </b> $city[$i] $state[$i] $postcode[$i] <br>";
}
$pagecount++;
?>
</body>
</html>
"Christian Dechery" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Can somebody please help me out??
> I'm going nuts...
> what's wrong with this piece of code?
>
> <pre>
> if(!isset($script_total_time))
> {
> // register the session variables to keep track
of
> step times
> $script_total_time=(float)$total_time;
> session_register("script_total_time");
> $step_times_array[$step]=$total_time;
> $step_times=serialize($step_times_array);
> //echo "step_times=\"$step_times\""; <- this
> echoes perfeclty
> session_register("step_times");
> }
> else
> {
> // update session variables
> $script_total_time+=(float)$total_time;
> $step_times_array=unserialize($step_times);
> $step_times_array[$step]=$total_time;
> $step_times=serialize($step_times_array);
> }
> </pre>
>
> why doesn't $step_times gets registered correctly? it always register an
> empty var...
> ____________________________
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer
>
--
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]