RE: [PHP-INST] Help! No POST/GET variables!
| From: | David Rydell | Date: | Wed, 14 May 2003 16:34:05 +0000 |
| Subject: | RE: [PHP-INST] Help! No POST/GET variables! | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-10896@lists.php.net to get a copy of this message | ||
the idea is better security... with globals on, it's easy for a user to
spoof variables. For example, if you have a form with a hidden variable
hvar1, then a user can use http://yourURL/?hvar1=badvalue. If you had
globals on, then $hvar1 would get set to "badvalue" and you'd never know how
the value was set. With globals off, you'd have $_POST['hvar'] =
"yourvalue"
and $_GET['havr1'] = "badvalue" and you'd know you've been spoofed...
-----Original Message-----
From: Jeremy Mereness [mailto:jeremym@optonline.net]
Sent: Wednesday, May 14, 2003 12:02 PM
To: php-install@lists.php.net
Subject: Re: [PHP-INST] Help! No POST/GET variables!
You know, I had read about this somewhere as a new "feature" of PHP, but
didn't make the connection.
Thanks very much for the quick answer. It turns out my Linux distro packages
PHP with global variables switched on by default, while getting PHP from the
source will have them switched off. Up til now I'd never thought about it.
I guess the idea is to write "cleaner" code making use of $_POST[variable]
and $_GET[variable] structures? or is there a better method?
-- j
----- Original Message -----
From: "Daniel Moore" <danielm@gropep.com.au>
To: <jeremym@optonline.net>
Cc: <php-install@lists.php.net>
Sent: Wednesday, May 14, 2003 9:09 AM
Subject: Re: [PHP-INST] Help! No POST/GET variables!
> Is it a global variables thing?
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.473 / Virus Database: 271 - Release Date: 4/17/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.473 / Virus Database: 271 - Release Date: 4/17/2003