Bug #6446 Updated: Session Array Variable Append
| From: | yohgaki@php.net | Date: | Tue, 29 Jan 2002 01:08:17 +0000 |
| Subject: | Bug #6446 Updated: Session Array Variable Append | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-78377@lists.php.net to get a copy of this message | ||
ID: 6446
Updated by: yohgaki
Reported By: nathan@cjhunter.com
Old Status: Open
Status: Closed
Bug Type: Feature/Change Request
Operating System: Linux 2.0.36
PHP Version: 4.0.1pl2
New Comment:
Won't change....
Previous Comments:
------------------------------------------------------------------------
[2000-08-30 15:12:59] nathan@cjhunter.com
When using php sessions with a registered array variable; if that
variable is set before the call to session_start() is made, instead of
overwriting the variable with the stored session value I request php
check if that variable is already set and do an array_merge() on the
two arrays. This is useful for accumulating key and value pairs.
Example
first..
<?
$input = array();
session_register("input");
?>
then..
<?
// Upon form submission at session_start() the input variable is
overwritten
session_start();
var_dump($input);
?>
<form>
<input type="text" name="input[<?echo time()?>]">
<input type="submit">
</form>
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=6446&edit=1