The Missing Credits;
About the Author;
About the Creative Team;
Acknowledgments;
The Missing Manual Series;
Introduction;
What PHP and MySQL Can Do;
What Is PHP?;
What Is MySQL?;
About This Book;
About the Online Resources;
Safari® Books Online;
Part 1: PHP and MySQL Basics;
Chapter 1: PHP: What, Why, and Where?;
1.1 PHP Comes in Two Flavors: Local and Remote;
1.2 PHP: Going Local;
1.3 Write Your First Program;
1.4 Run Your First Program;
1.5 But Where's That Web Server?;
Chapter 2: PHP Meets HTML;
2.1 Script or HTML?;
2.2 PHP Talks Back;
2.3 Run PHP Scripts Remotely;
Chapter 3: PHP Syntax: Weird and Wonderful;
3.1 Get Information from a Web Form;
3.2 Working with Text in PHP;
3.3 The $_REQUEST Variable Is an Array;
3.4 What Do You Do with User Information?;
Chapter 4: MySQL and SQL: Database and Language;
4.1 What Is a Database?;
4.2 Installing MySQL;
4.3 SQL Is a Language for Talking to Databases;
Part 2: Dynamic Web Pages;
Chapter 5: Connecting PHP to MySQL;
5.1 Writing a Simple PHP Connection Script;
5.2 Cleaning Up Your Code with Multiple Files;
5.3 Building a Basic SQL Query Runner;
Chapter 6: Regular Expressions;
6.1 String Matching, Double-Time;
Chapter 7: Generating Dynamic Web Pages;
7.1 Revisiting a User's Information;
7.2 Planning Your Database Tables;
7.3 Saving a User's Information;
7.4 Show Me the User;
7.5 Revisiting (and Redirecting) the Create User Script;
Part 3: From Web Pages to Web Applications;
Chapter 8: When Things Go Wrong (and They Will);
8.1 Planning Your Error Pages;
8.2 Finding a Middle Ground for Error Pages with PHP;
8.3 Add Debugging to Your Application;
8.4 Redirecting On Error;
Chapter 9: Handling Images and Complexity;
9.1 Images Are Just Files;
9.2 Images Are for Viewing;
9.3 And Now for Something Completely Different;
Chapter 10: Binary Objects and Image Loading;
10.1 Storing Different Objects in Different Tables;
10.2 Inserting a Raw Image into a Table;
10.3 Your Binary Data Isn't Safe to Insert...Yet;
10.4 Connecting Users and Images;
10.5 Show Me the Image!;
10.6 Embedding an Image Is Just Viewing an Image;
10.7 So, Which Approach Is Best?;
Chapter 11: Listing, Iterating, and Administrating;
11.1 Thinking about What You Need as an Admin;
11.2 Listing All Your Users;
11.3 Deleting a User;
11.4 Talking Back to Your Users;
11.5 Standardizing on Messaging;
11.6 Integrating Utilities, Views, and Messages;
Part 4: Security and the Real World;
Chapter 12: Authentication and Authorization;
12.1 Basic Authentication;
12.2 Abstracting What's the Same;
12.3 Passwords Don't Belong in PHP Scripts;
12.4 Passwords Create Security, But Should Be Secure;
Chapter 13: Cookies, Sign-Ins, and Ditching Crummy Pop-Ups;
13.1 Moving Beyond Basic Authentication;
13.2 Logging In with Cookies;
13.3 Adding Context-Specific Menus;
Chapter 14: Authorization and Sessions;
14.1 Modeling Groups in Your Database;
14.2 Checking for Group Membership;
14.3 Group-Specific Menus;
14.4 Entering Browser Sessions;
14.5 Memory Lane: Remember That Phishing Problem?;
14.6 Why Would You Ever Use Cookies?;
Part 5: Appendixes;
Installing PHP on Windows Without WAMP;
Installing PHP from www.php.net;
Installing MySQL Without MAMP or WAMP;
Installing MySQL;