Class Overview
In this PHP training course, students will learn to create database-driven websites using PHP and MySQL or the database of their choice.
Class Goals
- Learn how PHP works
- Learn the basic syntax of PHP
- Learn to create dynamic interactive pages with PHP
- Learn to manipulate files with PHP
- Learn to work with arrays in PHP
- Learn to validate forms with PHP
- Learn to write functions in PHP
- Learn to manipulate and manage database data with PHP
- Learn to authenticate users with PHP
- Learn to manage sessions with PHP
- Learn to work with the PEAR:DB module
- Learn advanced form validation with regular expressions
- Learn to send email with PHP
Class Outline
- PHP Basics
- How PHP Works
- The php.ini File
- Basic PHP Syntax
- PHP Tags
- PHP Statements and Whitespace
- Comments
- PHP Functions
- Hello World!
- Variables
- Variable Types
- Variable Names (Identifiers
- Type Strength
- Hello Variables!
- Variable Scope
- Superglobals
- Constants
- Variable-Testing and Manipulation Functions
- First PHP Script
- PHP Operators
- Creating Dynamic Pages
- Single Quotes vs. Double Quotes
- Passing Variables on the URL
- Passing Variables via the Query String
- Flow Control
- Conditional Processing
- If Conditions
- Working with Conditions
- Loops
- while
- do...while
- for
- break and continue
- Working with Loops
- Arrays
- Enumerated Arrays
- Initializing Arrays
- Appending to an Array
- Reading from Arrays
- Looping through Arrays
- Working with Enumerated Arrays
- Associative Arrays
- Initializing Associative Arrays
- Reading from Associative Arrays
- Looping through Associative Arrays
- Superglobal Arrays
- Working with Associative Arrays
- Two-dimensional Arrays
- Reading from Two-dimensional Arrays
- Looping through Two-dimensional Arrays
- Array Manipulation Functions
- PHP and HTML Forms
- HTML Forms
- How HTML Forms Work
- A Sample HTML Form
- Form Variables
- Processing Form Input
- String Manipulation
- Formatting Strings
- Concatenation
- String Manipulation Functions
- Examples of String Functions
- Working with String Manipulation Functions
- Magic Quotes
- magic_quotes_gpc
- magic_quotes_runtime
- Recommendation on Magic Quotes
- Reusing Code and Writing Functions
- Including Files
- require
- require_once
- auto_prepend_file and auto_append_file
- Adding a Header and Footer
- User Functions
- Defining and Calling Functions
- Default Values
- Variable Scope
- By Reference vs. By Value
- Form Processing
- Code Organization
- Form Validation and Presentation Functions
- Managing Data
- Querying a Database
- mysqli() Overview
- mysqli Methods and Properties
- Inserting and Updating Records
- mysqli Prepared Statements
- Inserting Records
- PEAR:DB
- Advantages and Disadvantages of PEAR DB
- Why use a database abstraction layer?
- When not to use a database abstraction layer?
- Using PEAR DB
- Creating a Customer Report
- Authentication with PHP and SQL
- A Database-less Login Form
- Authenticating Users
- Regular Expressions
- Perl-compatible Regular Expression Functions
- preg_match()
- preg_replace()
- Regular Expression Tester
- Regular Expression Syntax
- Start and End ( ^ $ )
- Number of Occurrences ( ? + * {} )
- Common Characters ( . \d \D \w \W \s \S )
- Grouping ( [] )
- Negation ( ^ )
- Subpatterns ( () )
- Alternatives ( | )
- Escape Character ( \ )
- Form Validation Functions with Regular Expressions
- Session Control and Cookies
- Sessions
- Configuring Sessions
- Session Functions
- Cookies
- Authentication with Session Control
- Sending Email with PHP
- mail()
- Shortcomings of mail()
- PHPMailer
- Sending a Password by Email
- File System Management
- Opening a File
- fopen()
- Reading from a File
- fgets()
- Writing to a File
- fwrite()
- Writing to a File
- File Locking
- flock()
- Uploading Files via an HTML Form
- Getting File Information
- More File Functions
- Directory Functions
- Getting a Directory Listing
- Creating a Resume Management Page
Class Materials
All students receive a course manual or book and all the class examples.
Students in private onsite classes will also receive:
Class Prerequisites
Experience in the following areas is required:
- HTML
Experience in the following areas would be beneficial:
- CSS
- Basic Programming
Technical Requirements
Our computer technical requirements and setup process is easy, with support just a click away.
After you have successfully installed PHP and MySQL, it is time to open Dreamweaver CS5 and connect to MySQL. Make sure that every window is closed except ...