Before getting into the heart of developing PHP- and MySQL-driven Web sites, I'm going to spend a few pages discussing the bane of the programmer: errors. As you gain experience, you'll make fewer errors and pick up your own debugging methodologies, but there are plenty of tools and techniques you can use to help ease the learning process. This chapter has three main threads. One focus is on learning about the various kinds of errors that can occur when developing dynamic Web sites and what their likely causes are. Second, a multitude of debugging techniques are taught, in a step-by-step format. Finally, you'll see different techniques for handling the errors that occur in the most graceful manner possible. Before I begin, a word on errors: they happen to the best of us. Even the author of this here book sees plenty of errors in his Web development duties (but rest assured that the code in this book should be bug-free). Thinking that you'll get to a skill level where errors never occur is a fool's dream, but knowing how to quickly catch, handle, and fix errors is a major skill in its own right. So try not to become frustrated as you make errors; instead, bask in the knowledge that you're becoming a better debugger! |