note 116380 added to tutorial.firstpage
| From: | girdharsingh19893 at gmail dot com | Date: | Tue, 23 Dec 2014 12:26:43 +0000 |
| Subject: | note 116380 added to tutorial.firstpage | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201244@lists.php.net to get a copy of this message | ||
PHP TUTORIAL
Safe PHP input filtering
Whatever your opinion of PHP, it's one of the most-used scripting languages on the web today,
and because it's so easy to pick up the basics, many people put very unsafe code online. There
are dozens of ways you can screw up your PHP code, but the biggest issues come from failing to
filter input, or failing to escape output.
These aren't just beginner mistakes: many very large, very popular PHP scripts written by large
communities of coders have regular security releases because of bad or faulty input filtering.
Failing to filter input can expose your server and data to attack, and many of these attacks are now
automated (because using hacked web servers to send spam is an industry now).
Filtering and Escaping are two essential principles in web coding that you need to apply whatever
language you use. This page is about how to filter input safely with PHP.
Most PHP scripts process content in some way, and then either store it in a database or output it to
a web page. If that content comes from outside the script (like a form on a web page, or a part of
the script's URL), then you need to check that it's what you're expecting, and
nothing more.
Written by - Girdhar singh
----
Server IP: 72.52.91.14
Probable Submitter: 182.69.159.12
----
Manual Page -- http://php.net/manual/en/tutorial.firstpage.php
Edit -- https://master.php.net/note/edit/116380
Del: integrated -- https://master.php.net/note/delete/116380/integrated
Del: useless -- https://master.php.net/note/delete/116380/useless
Del: bad code -- https://master.php.net/note/delete/116380/bad+code
Del: spam -- https://master.php.net/note/delete/116380/spam
Del: non-english -- https://master.php.net/note/delete/116380/non-english
Del: in docs -- https://master.php.net/note/delete/116380/in+docs
Del: other reasons-- https://master.php.net/note/delete/116380
Reject -- https://master.php.net/note/reject/116380
Search -- https://master.php.net/manage/user-notes.php