[FX.php List] $_REQUEST

Andrew Denman adenman at tmea.org
Wed Jul 30 15:40:56 MDT 2008


Also note that the $_REQUEST variable includes values from the $_COOKIE
variable (if any).  When created, it goes in order of GET, POST, and then
COOKIE with newer values overriding older values.
http://us.php.net/manual/en/reserved.variables.request.php

I have not yet had an instance where I'm using both POST and GET so I
haven't used $_REQUEST and cannot provide first-hand experience. From the
sounds of the docs though, I think I would stick with the separate
detection.

Andrew Denman

-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Jonathan Schwartz
Sent: Wednesday, July 30, 2008 4:17 PM
To: fx.php_list at mail.iviking.org
Subject: [FX.php List] $_REQUEST

Hi Folks,

I've been rethinking how to handle forms and validation.

Sometimes the data being validated comes from a POST and sometimes a 
GET, depending on whether the data was generated from a Form or a 
link.

Up until now, I have had to deal with both cases ...if($_GET[] ) and 
if($_POST).

I just realized that I can use $_REQUEST and not worry which type the 
data came from.

Is this a valid way to go?  Something tells me that $_REQUEST isn't.

Thanks

J
-- 
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-370-5011
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list