PHP & MySQL: Your visual blueprint for creating dynamic,
database driven Web sites
Table of Contents
Chapter 1: Setting Up Your Development Environment
- Introducing Dynamic Web Sites
- Setting Up Your Development Environment
- Obtain Apache
- Install Apache
- Obtain MySQL
- Install MySQL
- Configure MySQL
- Install MySQL Administration Programs
- Create MySQL Accounts for Use in PHP Scripts
- Obtain PHP
- Install PHP
- Configure Apache to Process PHP Code
- Configure PHP
- Test Your Development Environment
Chapter 2: PHP Basics
- How PHP Works
- Add PHP Code to a Web Page File
- Using PHP statements
- Understanding PHP Output Statements
- Using PHP Variables
- Using PHP Constants
- Working with Numbers
- Working with Character Strings
- Working with Dates and Times
- Modify or Remove Variables
- Using Variable Variables
- Understanding Error Messages
- Add Comments to A Script
Chapter 3: Using Arrays
- Create an Array
- Modify or Remove an Array
- Get Information About an Array
- Sort an Array
- Walk through an Array with foreach
- Walk through an Array Manually
- Find Values in an Array
- Compare Arrays
- Split and Merge Arrays
- Convert an Array into a String and Vice Versa
- Store a Set of Variables in an Array
- Store Array Elements in Separate Variables
- Create a Multidimensional Array
- Walk through a Multidimensional Array
- Using Built-in PHP Arrays
Chapter 4: Controlling the Flow of the Script
- Change the Order of Statement Execution
- Check the Contents of a Variable
- Set Up Conditions with Comparison Operators
- Introducing Regular Expressions
- Match Character Strings to Patterns Using Regular Expressions
- Join Multiple Comparisons with Logical Operators
- Using an If Statement
- Using a Switch Statement
- Using a for Loop
- Using a While Loop
- Using a do..while Loop
- Avoid an Infinite Loop
- Break Out of a Loop
Chapter 5: Reusing PHP Code
- Include a Code File
- Configure the Path to the Include Files
- Include Files Automatically
- Store Include Files Securely
- Define and Use a Function
- Using Variables in a Function
- Pass Values to a Function
- Return Values from a Function
Chapter 6: Some Useful PHP Built-in Functions
- Format a Number
- Round a Number
- Find the Largest or Smallest Number
- Remove Leading and Trailing Blank Spaces
- Change the Case of a String
- Format a String
- Count the Characters or Substrings in a String
- Locate a Substring in a String
- Get a Substring
- Find and Replace Substrings
- Add a Substring to a String
- Using Regular Expressions to Replace Text
- Pad or Repeat a String
- Convert a Character to and from an ASCII Value
- Compare Strings
- Send an E-mail Message
- Send an HTTP Header
- Read Configuration Settings
- Set a Local PHP Configuration Option
Chapter 7: Using MySQL Databases
- How a MySQL Database Works
- Send a Query with the mysql Client
- Send a Query with the MySQL Query Browser
- Create, Select, or Remove a MySQL Database
- Define a MySQL Table
- Create and Remove a MySQL Table
- Modify the MySQL Table Structure
- Add a Row of Data to a Database
- Add Data from a Text File to a Database
- Store Incremental Values in a Column
- Retrieve Data from a Database
- Limit Query Execution to Specific Rows with a WHERE Clause
- Retrieve Data from Multiple Tables with Union
- Retrieve Data from Multiple Tables by Joining Tables
- Update Data in the Database
- Remove Data from the Database
- Query a MySQL Database from a PHP Script
- Display Database Data on a Web Page in a PHP Script
- Handling MySQL Errors
Chapter 8: Administering MySQL Database
- Understanding MySQL Accounts
- View Existing Accounts
- Create a MySQL Account
- Change the Password for a MySQL Account
- Add and Remove Privileges
- Change the Name for a MySQL Account
- Remove a MySQL Account
- Stop and Start the MySQL Server
- Using MySQL Logs
- Back Up the Data
- Restore the Data
- Upgrade MySQL
Chapter 9: Adding HTML Forms to a Web Pag
- Display an HTML Form
- Add a Text Field
- Add a Multiline Text Area
- Add a Hidden Field
- Add a Dynamic Selection List to a Form
- Add a Date Selection List
- Add Dynamic Radio Buttons
- Add Dynamic Check Boxes
- Create One or More Submit Buttons
- Choosing the Post or the Get Method for a Form
- Create a Form that Uploads a File
Chapter 10: Processing Data from Forms
- Process Information from a Form
- Display Data from a Form
- Display and Process a Form in One Script
- Check for Blank Fields
- Verify Form Data
- Clean Form Data
- Adding Form Data to a Database
- Insert Form Data into a Database
- Update or Remove Database Data
- Processing an Uploaded File
Chapter 11: Managing User Sessions
- Understanding User Sessions
- Send a New Web Page to the Browser
- Add Information to a URL
- Store Information in Cookies
- Store Information in a PHP Session
- Using PHP Sessions without Cookies
Chapter 12: Object-Oriented Programming in PHP
- Understanding Object-Oriented Programming
- Create and Use an Object
- Set Properties in a Class
- Add a Method to a Class
- Write a Constructor or a Destructor Method
- Using PHP Magic Methods to Get or Set Properties
- Using Inheritance in a Class
- Using Exceptions
- Copy and Compare Objects
- Get Information about Objects and Classes
- Using Abstract Classes
- Using Interfaces