Re: $_POST vs $_REQUEST
| From: | Slack-Moehrle | Date: | Mon, 22 Feb 2010 22:02:17 +0000 |
| Subject: | Re: $_POST vs $_REQUEST | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-302270@lists.php.net to get a copy of this message | ||
John,
>>Then if you use a MySQL database you would escape the string like this
>>$tmp = mysql_real_escape_string($_REQUEST['yyy']);
>>mysql_real_escape_string() protect from SQL injection by escaping your
>>string according to what your charset requires.
Good point, I should be doing that. But only to String, not data stored in MySQL as Int or Date,
etc.
-ML