Appendix B. Security

B.1 Filter input 503
B.2 Escape output 505
B.3 Cross-site scripting 506
B.4 SQL Injection 507
B.5 Session fixation 509
B.6 More information 510
B.7 Summary 510

Security is an incredibly important topic in the field of web application development. As a PHP developer, you’re going to be responsible for the security of your PHP code, and your applications are sure to be the target of frequent attacks. This appendix tries to give a basic introduction to get you started on the right foot, so that you can learn strategies and techniques for secure PHP programming.

It also shows a few of the most common and dangerous attacks currently facing PHP developers, such as cross-site scripting (XSS) and SQL injection. You’ll see how these ...

Get PHP in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.