I've reserved this last chapter to discuss the topics of security and logging. The applications you write are obviously intended to be used by others. Rarely do they exist in a vacuum and as such it is important to understand the security issues that face all PHP developers.
The aim of security is to prevent the misuse of your application in a way that could compromise data or even the system itself and minimize the effects if such a compromise were to happen. Logging can help support this by tracking usage and changes.
This chapter is a bit different from the previous ones in that I won't provide you with much reusable code in this chapter. Instead, I offer you the background necessary to develop your own. In this chapter you will gain an understanding of the following:
You will also learn how to prevent accidental deletion of records in a database and conveniently log INSERT, UPDATE and DELETE queries.
Just because this chapter has been placed last in the book, don't think that security should be treated as an after-thought. Good programmers can protect their applications by keeping security in mind at all times.
18.191.241.51