Introduction to PHP
Course Description
In this PHP training course, students will learn to create database-driven websites using PHP and MySQL (the LAMP platform - Linux, Apache, MySql and Apache) or the database of their choice.
4 Days
Contact us for pricing
Prerequisites
Experience in the following areas is required: HTMLExperience in the following areas would be beneficial: CSS
Basic Programming
PHP Basics
How PHP WorksThe 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 ProcessingIf Conditions
Working with Conditions
Loops
Working with Loops
Arrays
Enumerated ArraysInitializing 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 FormsHow HTML Forms Work
A Sample HTML Form
Form Variables
Processing Form Input
String Manipulation
Formatting StringsConcatenation
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 Filesrequire
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 Databasemysqli() Overview
mysqli Methods and Properties
Inserting and Updating Records
mysqli Prepared Statements
Inserting Records
PEAR:DB
Advantages and Disadvantages of PEAR DBWhy 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 FormAuthenticating Users
Regular Expressions
Perl-compatible Regular Expression Functionspreg_match()
preg_replace()
Regular Expression Tester
Regular Expression Syntax
Form Validation Functions with Regular Expressions
Session Control and Cookies
SessionsConfiguring 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 Filefopen()
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
PHP