PHP Programming for Interactive Websites

[PDF brochure]

Course length: 3-days

Course Description:

Learn to create dynamic, sophisticated, efficient and easily managed websites using PHP.

This class is platform-independent, so it doesn’t matter if you are deploying your website on Linux or Windows.

Prerequisites:

  • HTML Level 1 and Level 2 - ability to write HTML code in plain text
  • 2667 Intro to Programming - understanding the principles of object oriented programming
  • MS 2778 - Writing queries in Microsoft SQL Server 2005/2008

Delivery Method:

Instructor-led, classroom-delivery learning model with structured hands-on activities.

Course Content:

Chapter 1. Getting Started with PHP

  • Basic XHTML Syntax
  • Basic PHP Syntax
  • Testing Your Script
  • Sending Text to the Browser
  • Sending HTML to the Browser
  • Using White Space in PHP and HTML
  • Adding Comments to Your Scripts

Chapter 2. Variables

  • What Are Variables?
  • Variable Syntax
  • Types of Variables
  • Assigning Values to Variables
  • Understanding Quotation Marks

Chapter 3. HTML Forms and PHP

  • Creating a Simple Form
  • Using GET or POST
  • Receiving Data from a Form in PHP
  • Displaying Errors
  • Error Reporting
  • The Register Globals Problem
  • Manually Sending Data to a Page

Chapter 4. Using Numbers

  • Creating the Form
  • Adding, Subtracting, Multiplying, and Dividing
  • Formatting Numbers
  • Using Multiple Operators
  • Incrementing and Decrementing a Number
  • Creating Random Numbers

Chapter 5. Using Strings

  • Creating the HTML Form
  • Connecting Strings (Concatenation)
  • Combating Magic Quotes
  • HTML and PHP
  • Encoding and Decoding Strings
  • Replacing Parts of a String
  • Other String Functions

Chapter 6. Control Structures

  • Creating the HTML Form
  • The if Conditional
  • Using else
  • More Operators
  • Using elseif
  • The Switch Conditional
  • The for Loop

Chapter 7. Using Arrays

  • What Is an Array?
  • Creating an Array
  • Adding Items to an Array
  • Accessing Array Elements
  • Creating Multidimensional Arrays
  • Sorting Arrays
  • Transforming Between Strings and Arrays
  • Creating an Array from a Form

Chapter 8. Creating Web Applications

  • Creating Templates
  • Using External Files
  • Using Constants
  • Working with the Date and Time
  • Handling HTML Forms with PHP, Revisited
  • Making Forms Sticky
  • Sending Email
  • Output Buffering
  • Manipulating HTTP Headers

Chapter 9. Cookies and Sessions

  • What Are Cookies?
  • Creating Cookies
  • Reading from Cookies
  • Adding Parameters to a Cookie
  • Deleting a Cookie
  • What Are Sessions?
  • Creating a Session
  • Accessing Session Variables
  • Deleting a Session

Chapter 10. Creating Functions

  • Creating and Using Simple Functions
  • Creating and Calling Functions that Take Arguments
  • Setting Default Argument Values
  • Creating and Using Functions that Return a Value
  • Understanding Variable Scope

The following chapters are optional based on student interest and course timing.

Chapter 11. Files and Directories

  • File Permissions
  • Writing to Files
  • Locking Files
  • Reading from Files
  • Handling File Uploads
  • Navigating Directories
  • Creating Directories
  • Reading Files Incrementally

Chapter 12. Intro to Databases

  • Introduction to SQL
  • Connecting to MySQL
  • MySQL Error Handling
  • Creating and Selecting a Database
  • Creating a Table
  • Inserting Data into a Database
  • Retrieving Data from a Database
  • Deleting Data in a Database
  • Updating Data in a Database

Chapter 13. Regular Expressions

  • What Are Regular Expressions?
  • Matching Patterns
  • Using Literals
  • Using Metacharacters
  • Using Quantifiers
  • Using Classes
  • Matching and Replacing Patterns

Appendix A Installation and Configuration

  • Installing on Windows 2000
  • Installing on Mac OS X
  • Using the MySQL Monitor
  • Creating MySQL Users
  • PHP Configuration

Appendix B. Resources

  • Online PHP Resources
  • Database Resources
  • Advanced Topics
  • Top Ten Frequently Asked Questions (or Problems)
  • Tables