Re: $_POST vs $_REQUEST
| From: | Richard | Date: | Mon, 22 Feb 2010 20:51:41 +0000 |
| Subject: | Re: $_POST vs $_REQUEST | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-302258@lists.php.net to get a copy of this message | ||
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