Re: [PHP] $_POST vs $_REQUEST

[email protected] (Richard)
Newsgroups php.general
Message-ID <[email protected]>
Hi,

> I have Forms that I submit for processing. I have seen examples of people using either $_POST or $_REQUEST.
>
> When would I choose one over the other?

It's a wise choice to go with $_POST, unless your form is a GET form,
in which case use $_GET. $_REQUEST has the potential to open your
script(s) up to security issues.

> ...

Use quoted strings - either single or double quotes. Eg:

$myArray['myKey']
$myArray["myKey"]

-- 
Richard Heyes
HTML5 canvas graphing: RGraph - http://www.rgraph.net (updated 20th February)
Lots of PHP and Javascript code - http://www.phpguru.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.