- Impact
- 11
These are some code snippets for use in cleaning input. Please note that these are NOT the complete security solution; for best results, you should use Whitelist-based authentication.
For AJAX requests:
For standard forms:
Jason
For AJAX requests:
Code:
foreach ($_POST as $key => $value)
$_POST[$key]=trim(strip_tags(urldecode($value)));
For standard forms:
Code:
foreach ($_POST as $key => $value)
$_POST[$key]=trim(strip_tags($value));
Jason