Table of Contents
1. Dynamic Content and the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
HTTP and the Internet 1
PHP and MySQL’s Place in Web Development 2
The Components of a PHP Application 4
Integrating Many Sources of Information 7
Requesting Data from a Web Page 11
2. Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Developing Locally 15
Working Remotely 35
3. Exploring PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
PHP and HTML Text 39
Coding Building Blocks 43
4. PHP Decision-Making . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Expressions 62
Operator Concepts 64
Conditionals 71
Looping 77
5. Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Calling Functions 87
Defining Functions 89
Object-Oriented Programming
6. Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Array Fundamentals 107
7. Working with MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
MySQL Database 122
Managing the Database 125
Using phpMyAdmin 126
Database Concepts 131
Structured Query Language 132
8. Database Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Database Design 146
Backing Up and Restoring Data 155
Advanced SQL 159
9. Getting PHP to Talk to MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
The Process 180
Querying the Database with PHP Functions 180
Using PEAR 190
10. Working with Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Building a Templates 218
11. Practical PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
String Functions 223
Date and Time Functions 233
File Manipulation 238
Calling System Calls 249
12. XHTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Why XHTML? 253
XHTML and XML Namespaces 254
XHTML Versions 254
Generating XHTML with PHP 261
13. Modifying MySQL Objects and PHP Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Changing Database Objects from PHP 263
Manipulating Table Data 266
Displaying Results with Embedded Links
Presenting a Form to Add and Process in One File 270
Updating Data 276
Deleting Data 277
Performing a Subquery 282
14. Cookies, Sessions, and Access Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Cookies 285
PHP and HTTP Authentication 288
Sessions 294
Using Auth_HTTP to Authenticate 301
15. Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Session Security 316
16. Validation and Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Validating User Input with JavaScript 325
Pattern Matching 329
Redisplaying a Form After PHP Validation Fails 333
17. Sample Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Configuration File 340
Page Framework 340
Database 343
Displaying a Postings Summary 346
Displaying a Posting and Its Comments 349
Adding and Changing Posts 352
Adding and Changing Comments 358
18. Finishing Your Journey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
PHP Coding Standards 366
PEAR 371
Frameworks 372
Ajax 373
Wikis 373
Finding Help on the Web 373

No User Responded in " Download Learning PHP and MySQL "
Leave A Reply Below