CITATION

Vaswani, Vikram. PHP: A BEGINNER'S GUIDE. US: McGraw-Hill Osborne Media, 2008.

PHP: A BEGINNER'S GUIDE

Published:  October 2008

eISBN: 9780071549028 0071549021 | ISBN: 9780071549011
  • Contents
  • Foreword
  • Acknowledgments
  • Introduction
  • Part I: Understanding PHP Basics
  • 1 Introducing PHP
  • History
  • Unique Features
  • Basic Development Concepts
  • Creating Your First PHP Script
  • Try This 1-1: Mixing PHP with HTML
  • Sample Applications
  • Summary
  • 2 Using Variables and Operators
  • Storing Data in Variables
  • Understanding PHP’s Data Types
  • Setting and Checking Variable Data Types
  • Using Constants
  • Manipulating Variables with Operators
  • Try This 2-1: Building a Dollars-to-Euros Converter
  • Handling Form Input
  • Try This 2-2: Building an Interactive HTML Color Sampler
  • Summary
  • 3 Controlling Program Flow
  • Writing Simple Conditional Statements
  • Try This 3-1: Testing Odd and Even Numbers
  • Writing More Complex Conditional Statements
  • Try This 3-2: Assigning Boy Scouts to Tents
  • Repeating Actions with Loops
  • Try This 3-3: Building a Factorial Calculator
  • Working with String and Numeric Functions
  • Try This 3-4: Processing a Member Registration Form
  • Summary
  • 4 Working with Arrays
  • Storing Data in Arrays
  • Processing Arrays with Loops and Iterators
  • Try This 4-1: Averaging the Grades of a Class
  • Using Arrays with Forms
  • Try This 4-2: Selecting Pizza Toppings
  • Working with Array Functions
  • Try This 4-3: Checking Prime Numbers
  • Working with Dates and Times
  • Try This 4-4: Building an Age Calculator
  • Summary
  • 5 Using Functions and Classes
  • Creating User-Defined Functions
  • Try This 5-1: Calculating GCF and LCM
  • Creating Classes
  • Try This 5-2: Encrypting and Decrypting Text
  • Using Advanced OOP Concepts
  • Try This 5-3: Generating Form Selection Lists
  • Summary
  • Part II: Working with Data from Other Sources
  • 6 Working with Files and Directories
  • Reading Files
  • Writing Files
  • Try This 6-1: Reading and Writing Configuration Files
  • Processing Directories
  • Performing Other File and Directory Operations
  • Try This 6-2: Creating a Photo Gallery
  • Summary
  • 7 Working with Databases and SQL
  • Introducing Databases and SQL
  • Try This 7-1: Creating and Populating a Database
  • Using PHP’s MySQLi Extension
  • Adding or Modifying Data
  • Handling Errors
  • Try This 7-2: Adding Employees to a Database
  • Using PHP’s SQLite Extension
  • Try This 7-3: Creating a Personal To-Do List
  • Using PHP’s PDO Extension
  • Try This 7-4: Building a Login Form
  • Summary
  • 8 Working with XML
  • Introducing XML
  • Try This 8-1: Creating an XML Document
  • Using PHP’s SimpleXML Extension
  • Try This 8-2: Converting XML to SQL
  • Try This 8-3: Reading RSS Feeds
  • Using PHP’s DOM Extension
  • Try This 8-4: Recursively Processing an XML Document Tree
  • Try This 8-5: Reading and Writing XML Configuration Files
  • Summary
  • 9 Working with Cookies, Sessions, and Headers
  • Working with Cookies
  • Try This 9-1: Saving and Restoring User Preferences
  • Working with Sessions
  • Try This 9-2: Tracking Previous Visits to a Page
  • Using HTTP Headers
  • Try This 9-3: Building a Better Login Form
  • Summary
  • Part III: Security and Troubleshooting
  • 10 Handling Errors
  • Handling Script Errors
  • Try This 10-1: Generating a Clean Error Page
  • Using Exceptions
  • Try This 10-2: Validating Form Input
  • Logging Errors
  • Debugging Errors
  • Summary
  • 11 Securing PHP
  • Sanitizing Input and Output
  • Securing Data
  • Validating User Input
  • Try This 11-1: Validating Form Input
  • Configuring PHP Security
  • Summary
  • 12 Extending PHP
  • Using PEAR
  • Try This 12-1: Accessing POP3 Mailboxes with PEAR
  • Using PECL
  • Try This 12-2: Creating Zip Archives with PECL
  • Summary
  • Part IV: Appendixes
  • A: Installing and Configuring Required Software
  • Obtaining the Software
  • Installing and Configuring the Software
  • Testing the Software
  • Performing Post-Installation Steps
  • Summary
  • B: Answers to Self Test
  • Index