Beginning PHP 6, Apache, MySQL 6 Web Development
Apache, MySQL and PHP are each complex in and of themselves, and its 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 youve finished reading this book, youll 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 weve 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 thats 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. Weve 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, youll need a web browser, such as Mozilla Firefox, Internet Explorer, Google Chrome, Apple Safari or Opera to view your web pages.