Introduction to PHP
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.
- Cost: Price on application
- Duration: 4 Days
- This course is not available as part of our public schedule but can be provided on a customised client specific basis.
Experience in the following areas is required: HTML
Experience in the following areas would be beneficial: CSS
Basic Programming
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
Conditional Processing
If Conditions
Working with Conditions
Loops
Working with Loops
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
HTML Forms
How HTML Forms Work
A Sample HTML Form
Form Variables
Processing Form Input
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
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
Querying a Database
mysqli() Overview
mysqli Methods and Properties
Inserting and Updating Records
mysqli Prepared Statements
Inserting Records
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
A Database-less Login Form
Authenticating Users
Perl-compatible Regular Expression Functions
preg_match()
preg_replace()
Regular Expression Tester
Regular Expression Syntax
Form Validation Functions with Regular Expressions
Sessions
Configuring Sessions
Session Functions
Cookies
Authentication with Session Control
mail()
Shortcomings of mail()
PHPMailer
Sending a Password by Email
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