The entire contents of this edition of the book were updated to correspond to the latest versions of PHP and MySQL. Many sections were signficantly updated and amended in the process. Many other sections were added in this edition (and weren’t present in previous editions). The resulting second edition is a whopping 120 pages longer than the original!
- Introduction
- Chapter 1: Introduction to PHP
- Basic Syntax
- Sending Data to the Web Browser
- Understanding PHP, HTML, and White Space
- Writing Comments
- What Are Variables?
- About Strings
- About Numbers
- About Constants
- Single vs. Double Quotation Marks
- Chapter 2: Programming with PHP
- Creating an HTML Form
- Handling an HTML Form
- Managing Magic Quotes
- Conditionals and Operators
- Validating Form Data
- What Are Arrays?
- For and While Loops
- Chapter 3: Creating Dynamic Web Sites
- Including Multiple Files
- Handling HTML Forms with PHP Redux
- Making Sticky Forms
- Creating and Calling Your Own Functions
- Variable Scope
- Date and Time Functions
- Sending Email
- Chapter 4: Introduction to SQL and MySQL
- Choosing Your Column Types
- Choosing Other Column Properties
- Using the mysql Client
- Creating Databases and Tables
- Inserting Records
- Selecting Data
- Using Conditionals
- Using LIKE and NOT LIKE
- Sorting Query Results
- Limiting Query Results
- Updating Data
- Deleting Data
- Using Functions
- Chapter 5: Advanced SQL and MySQL
- Database Design
- Performing Joins
- Grouping Selected Results
- Creating Indexes
- Using Different Table Types
- Performing FULLTEXT Searches
- Database Optimization
- Chapter 6: Error Handling and Debugging
- General Error Types and Debugging
- Displaying PHP Errors
- Adjusting Error Reporting in PHP
- Creating Custom Error Handlers
- Logging PHP Errors
- PHP Debugging Techniques
- SQL and MySQL Debugging Techniques
- Chapter 7: Using PHP with MySQL
- Modifying the Template
- Connecting to MySQL and Selecting the Database
- Executing Simple Queries
- Retrieving Query Results
- Ensuring Secure SQL
- Counting Returned Records
- Updating Records with PHP
- Chapter 8: Web Application Development
- Adjusting Behavior for Server Settings
- Sending Values to a Script Manually
- Using Hidden Form Inputs
- Editing Existing Records
- Paginating Query Results
- Making Sortable Displays
- Understanding HTTP Headers
- Chapter 9: Cookies and Sessions
- Using Cookies
- Using Sessions
- Sessions and Cookies
- Improving Session Security
- Chapter 10: Web Application Security
- More Secure Form Validation
- Handling HTML
- Validating Data by Type
- Form Validation with JavaScript
- Regular Expressions
- Database Security and Encryption
- Chapter 11: Extended Topics
- Handling File Uploads
- PHP and JavaScript
- Using Output Buffering
- Using the Improved MySQL Extension
- New MySQL Features
- Using PEAR
- Chapter 12: Example—Content Management
- Creating the Template
- Creating the Basic Pages
- Managing URLs
- ManagingFiles
- Chapter 13: Example—User Registration
- Creating the Templates
- Writing the Configuration Scripts
- Creating the Home Page
- Registration
- Activating an Account
- Logging In and Logging Out
- Password Management
- Chapter 14: Example—E-Commerce
- Creating the Database
- The Administrative Side
- Creating the Public Template
- The Product Catalog
- The Shopping Cart
- Recording the Orders
- Appendix A: Installation
- Installation on Windows
- Installation on Mac OS X
- MySQL Permissions
- Testing Your Installation
- Configuring PHP
- Appendix B: Reference
- Appendix C: Resources