Re: GET, POST, REQUEST

From: Date: Sat, 17 Jun 2006 21:27:52 +0000
Subject: Re: GET, POST, REQUEST
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-238201@lists.php.net to get a copy of this message
On Sat, 17 Jun 2006 14:25:30 -0400, Ben Ramsey <ramsey@php.net> wrote: > On 6/17/06 9:30 AM, David Tulloh wrote: >> Martin Marques wrote: >>> Yesterday when reading some doc on PHP I noticed the $_REQUEST >>> predefined array, which looked like a solution to having to check in > GET >>> and POST data (I'm not sure if it will really have an impact on my >>> program yet). >> >> Yes, request is simply a merge of these arrays. It can be very useful >> and tends to be rather under used in PHP examples. > > Using $_REQUEST is similar to using register_globals. You simply cannot > trust the origin of the data. It's possible that a variable by the name > of "foo" exists as a cookie, POST value, and GET value. If you use > $_REQUEST, you cannot be assured that the value you are getting is from > the scope you intend to retrieve it. OK, now it's clear for me! Thanks for the enlightenment. -- --------------------------------------------------------- Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador ---------------------------------------------------------

« previous php.general (#238201) next »