| | |||||
| ||||||||
| CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Oct 2006 Location: NJ
Posts: 1,147
![]() ![]() ![]() | Clean Input 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: Code: foreach ($_POST as $key => $value) $_POST[$key]=trim(strip_tags(urldecode($value))); ????: NamePros.com http://www.namepros.com/code/404816-clean-input.html Code: foreach ($_POST as $key => $value) $_POST[$key]=trim(strip_tags($value));
__________________ Web Development |
| |