Re: variables always overwriting session variables?!
| From: | Rod Apeldoorn | Date: | Fri, 10 Nov 2000 17:58:49 +0000 |
| Subject: | Re: variables always overwriting session variables?! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24681@lists.php.net to get a copy of this message | ||
Hey Andrew,
The problem of the URL stored variables (GET) possible overwriting those in
a form (POST), is commonly overlooked. One thing to also look out for is
that a variable sent via a cookie seems to overwrite all. In order to be
sure the data is coming from the form I recommend using the
$HTTP_POST_VARS[]. On the other hand, if you wanted to ensure the variable
did come from the URL you could use the php variable $HTTP_GET_VARS[].
Thus where ever you were going to use $login you'd replace it with
$HTTP_POST_VARS["login"]
Hope this helps!
--
Rod Apeldoorn
rod@canowhoopass.com
http://www.canowhoopass.com/
"Andrew Elliston" <elists@elliston.net> wrote in message
news:200011101335.IAA25126@gibson.acpub.duke.edu...
I've recently begun experimenting with sessions in PHP4.3pl1 and seem to
have hit a snag.
Variables included in the URL _always_ overwrite the variables stored in the
session. Am I doing something wrong? Or is there a way to protect against
this?
<!-- Snip -->
Thanks,
Andrew Elliston