Apache, MySQL and PHP are each complex in and of themselves, and it's impossible for this book to cover every advanced detail of all three. The purpose of this book is to give you the best possible foundation for understanding how each of the core components work separately and together, which will enable you to take full advantage of all that they have to offer. When you've finished reading this book, you'll have a thorough understanding of the core concepts you need to be an effective developer using Apache, MySQL, and PHP, and hopefully a burning desire to continue learning and growing as a developer. We assume that anyone reading this book has some experience with web site development concepts and a basic working knowledge of HTML and CSS. Knowledge of other programming languages besides PHP is not a prerequisite for this book, but certainly any programming experience you have will help you understand and apply the concepts we present. This book is geared toward the "newbie" to Apache, MySQL, and PHP, and we've done our best to distill many of the core concepts and code snippets down to their most basic levels. You will find more complex and perhaps more efficient ways of accomplishing the same tasks we present in this book as your knowledge, comfort level, and experience increase. When that happens, you can congratulate yourself and know that you have come over to the "dark side" to join us as Apache, MySQL, and PHP enthusiasts! A variety of topics are covered in this book: Installation and configuration of Apache, MySQL, and PHP Basic introduction to each component and how they interact with one another Gathering information from and interacting with your web site visitors How to avoid errors and how to handle them when they inevitably occur Creating, altering and working with image files Handling user registration and logins E-mailing and setting up e-mail lists Building a content management system Enhancing your web site by adding e-commerce capabilities Incorporating a discussion forum into your site Monitoring the health of your web site through the use of activity logs and error logs Selecting a third-party web hosting provider Finding the text editor that's right for you Using multiple interfaces to connect to MySQL from PHP As you read through the chapters in this book and learn about each of these topics, you will be creating two complete web sites. The first is a movie review site that displays information about films and their respective reviews. This project will cover the basics, such as writing PHP code, creating a MySQL database, filling the database with data and showing specific information to your visitors based on what they want to see. The second project is a comic book fan web site. This site will be developed in the latter part of the book and will incorporate some of the more complex topics of working with Apache, MySQL and PHP. You will create a truly interactive web site where your visitors can interact with you and with other members of the site. We take you step by step through the development of each of these sites, and you will continually build upon them as new concepts are introduced. Note, however, that each of the chapters in this book has been designed as a standalone chapter, so that if you are not particularly interested in reading a specific topic then you are free to move on to another. If you thought the days of the "pop quiz" were over, think again! We have provided handy exercises at the end of most of the chapters to test your knowledge of discussed topic and challenge you to think one step further. We've provided answers to these exercises in Appendix A. This book is designed to be multiplatform and we cover topics and issues for both Windows-based and Linux-based machines. You will need Apache, MySQL and PHP to do the exercises in this book. All three are open source programs, so you can download and use them free of charge. We have provided instructions for downloading and installing all three components in Chapter 1 and Appendix I. You will also need a text editor to enter your code. Many editors are available that you can use, and some of the more popular ones are compared in Appendix F. Finally, you'll need a web browser, such as Mozilla Firefox, Internet Explorer, Google Chrome, Apple Safari or Opera to view your web pages. Table of Contents 1. Configuring Your Installation. 2. Creating PHP Pages Using PHP6. 3. Using PHP6 with MySQL. 4. Using Tables to Display Data. 5. Form Elements: Letting the User Work with Data. 6. Letting the User Edit the Database. 7. Manipulating and Creating Images with PHP. 8. Validating User Input. 9. Handling and Avoiding Errors. 10. Building Databases. 11. Sending Email. 12. User Logins, Profiles, and Personalization. 13. Building a Content Management System. 14. Mailing Lists. 15. Online Stores. 16. Creating a Bulletin Board System. 17. Using Log Files to Improve Your Site. 18. Troubleshooting. Appendix A. Answers to Exercises. Appendix B. PHP Quick Reference. Appendix C. PHP 6 Functions. Appendix D. MySQL Data Types. Appendix E. MySQL Quick Reference. Appendix F. Comparison of Text Editors. Appendix G. Choosing a Third Party Host. Appendix H. An Introduction to PEAR. Appendix I. AMP Installation. Index.
REVIEW Beginning PHP 6, Apache, MySQL Web Development