RE: [PHP] session vars with recursive form
| From: | Javier Muniz | Date: | Fri, 12 Jan 2001 19:31:45 +0000 |
| Subject: | RE: [PHP] session vars with recursive form | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-34286@lists.php.net to get a copy of this message | ||
This is probably due to the fact that form values don't override session
values... this is a feature, not a bug. (imagine if i could do:
http://www.yourdomain.com/highsecurity.php?user=admin
and magically
become admin... very broken security)
-jm
-----Original Message-----
From: bill [mailto:bill@billtron.com]
Sent: Friday, January 12, 2001 11:25 AM
To: php-general@lists.php.net
Subject: [PHP] session vars with recursive form
How can I correctly register session vars on a recursive form?
If I call a page repeatedly using:
<FORM ACTION="<?php echo $PHP_SELF ?>" METHOD="POST">
The earlier variables keep getting lost.
How can I register the session variables correctly? Each subsequent
page should set its own variable while remembering all those previously
set.
Right now the top of the page says:
-----------
session_start();
$thevals=array(alpha,beta,gamma,delta,epsilon);
while (list($key, $val) = each($thevals)) {
if (!session_is_registered($val) ) {
session_register("$val");
}
}
----------
thanks,
bill
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net