Learning PHP 5 O’Reilly Book

Learning PHP 5
Click Here To Download Book
Pages 398
Views 1761
Size 1.7 MB
Download 52
Table Of Contents

Who This Book Is For
Contents of This Book
Other Resources
Conventions Used in This Book
Using Code Examples
Comments and Questions
Chapter 1. Orientation and First Steps
Section 1.1. PHP’s Place in the Web World
Section 1.2. What’s So Great About PHP?
Section 1.3. PHP in Action
Section 1.4. Basic Rules of PHP Programs
Section 1.5. Chapter Summary
Chapter 2. Working with Text and Numbers
Section 2.1. Text
Section 2.2. Numbers
Section 2.3. Variables
Section 2.4. Chapter Summary
Section 2.5. Exercises
Chapter 3. Making Decisions and Repeating Yourself
Section 3.1. Understanding true and false
Section 3.2. Making Decisions
Section 3.3. Building Complicated Decisions
Section 3.4. Repeating Yourself
Section 3.5. Chapter Summary
Section 3.6. Exercises
Chapter 4. Working with Arrays
Section 4.1. Array Basics
Section 4.2. Looping Through Arrays
Section 4.3. Modifying Arrays
Section 4.4. Sorting Arrays
Section 4.5. Using Multidimensional Arrays
Section 4.6. Chapter Summary
Section 4.7. Exercises
Chapter 5. Functions
Section 5.1. Declaring and Calling Functions
Section 5.2. Passing Arguments to Functions
Section 5.3. Returning Values from Functions
Section 5.4. Understanding Variable Scope
Section 5.5. Chapter Summary
Section 5.6. Exercises
Chapter 6. Making Web Forms
Section 6.1. Useful Server Variables
Section 6.2. Accessing Form Parameters
Section 6.3. Form Processing with Functions
Section 6.4. Validating Data
Section 6.5. Displaying Default Values
Section 6.6. Putting It All Together
Section 6.7. Chapter Summary
Section 6.8. Exercises
Chapter 7. Storing Information with Databases
Section 7.1. Organizing Data in a Database
Section 7.2. Connecting to a Database Program
Section 7.3. Creating a Table
Section 7.4. Putting Data into the Database
Section 7.5. Inserting Form Data Safely
Section 7.6. Generating Unique IDs
Section 7.7. A Complete Data Insertion Form
Section 7.8. Retrieving Data from the Database
Section 7.9. Changing the Format of Retrieved Rows
Section 7.10. Retrieving Form Data Safely
Section 7.11. A Complete Data Retrieval Form
Section 7.12. MySQL Without PEAR DB
Section 7.13. Chapter Summary
Section 7.14. Exercises
Chapter 8. Remembering Users with Cookies and Sessions
Section 8.1. Working with Cookies
Section 8.2. Activating Sessions
Section 8.3. Storing and Retrieving Information
Section 8.4. Configuring Sessions
Section 8.5. Login and User Identification
Section 8.6. Why setcookie( ) and session_start( ) Want to Be at the Top of the Page
Section 8.7. Chapter Summary
Section 8.8. Exercises
Chapter 9. Handling Dates and Times
Section 9.1. Displaying the Date or Time
Section 9.2. Parsing a Date or Time
Section 9.3. Dates and Times in Forms
Section 9.4. Displaying a Calendar
Section 9.5. Chapter Summary
Section 9.6. Exercises
Chapter 10. Working with Files
Section 10.1. Understanding File Permissions
Section 10.2. Reading and Writing Entire Files
Section 10.3. Reading and Writing Parts of Files
Section 10.4. Working with CSV Files
Section 10.5. Inspecting File Permissions
Section 10.6. Checking for Errors
Section 10.7. Sanitizing Externally Supplied Filenames
Section 10.8. Chapter Summary
Section 10.9. Exercises
Chapter 11. Parsing and Generating XML
Section 11.1. Parsing an XML Document
Section 11.2. Generating an XML Document
Section 11.3. Chapter Summary
Section 11.4. Exercises
Chapter 12. Debugging
Section 12.1. Controlling Where Errors Appear
Section 12.2. Fixing Parse Errors
Section 12.3. Inspecting Program Data
Section 12.4. Fixing Database Errors
Section 12.5. Chapter Summary
Section 12.6. Exercises
Chapter 13. What Else Can You Do with PHP?
Section 13.1. Graphics
Section 13.2. PDF
Section 13.3. Shockwave/Flash
Section 13.4. Browser-Specific Code
Section 13.5. Sending and Receiving Mail
Section 13.6. Uploading Files in Forms
Section 13.7. The HTML_QuickForm Form-Handling Framework
Section 13.8. Classes and Objects
Section 13.9. Advanced XML Processing
Section 13.10. SQLite
Section 13.11. Running Shell Commands
Section 13.12. Advanced Math
Section 13.13. Encryption
Section 13.14. Talking to Other Languages
Section 13.15. IMAP, POP3, and NNTP
Section 13.16. Command-Line PHP
Section 13.17. PHP-GTK
Section 13.18. Even More Things You Can Do with PHP
Appendix A. Installing and Configuring the PHP Interpreter
Section A.1. Using PHP with a Web-Hosting Provider
Section A.2. Installing the PHP Interpreter
Section A.3. Installing PEAR
Section A.4. Downloading and Installing PHP’s Friends
Section A.5. Modifying PHP Configuration Directives
Section A.6. Appendix Summary
Appendix B. Regular Expression Basics
Section B.1. Characters and Metacharacters
Section B.2. Quantifiers
Section B.3. Anchors
Section B.4. Character Classes
Section B.5. Greed
Section B.6. PHP’s PCRE Functions
Section B.7. Appendix Summary
Section B.8. Exercises
Appendix C. Answers To Exercises
Section C.1. Chapter 2
Section C.2. Chapter 3
Section C.3. Chapter 4
Section C.4. Chapter 5
Section C.5. Chapter 6
Section C.6. Chapter 7
Section C.7. Chapter 8
Section C.8. Chapter 9
Section C.9. Chapter 10
Section C.10. Chapter 11
Section C.11. Chapter 12
Section C.12. Appendix B