7854  Reviews star_rate star_rate star_rate star_rate star_half

Introduction to PHP

This is a 4 day course where students will learn to create database-driven websites using PHP and MySQL or the database of their choice. PHP is a versatile server-side programming language that works...

Read More
$2,990 USD
Course Code WA2258
Duration 4 days
Available Formats Classroom, Virtual

This is a 4 day course where students will learn to create database-driven websites using PHP and MySQL or the database of their choice. PHP is a versatile server-side programming language that works hand-in-hand with front-end Web languages such as HTML and JavaScript. PHP can be used to create all types of dynamic web interfaces and has become one of the most widely used programming languages.

  • PHP is a popular general-purpose scripting language that is especially suited to web development. PHP is used in many web applications, from wiki pages to weblogs to Facebook.


All attendees must have general familiarity with HTML and CSS. Some database experience and/or programming experience will also be helpful.

Course Details


PHP Basics

  • Welcome to the Server-side
  • What is a web server?
  • Dynamic Websites
  • Google Chrome DevTools: Network Tab
  • Status Codes
  • How PHP Works
  • The phpini File
  • PHP Tags
  • Hello, World!
  • Comments
  • PHP Statements and Whitespace
  • PHP Functions
  • phpnet
  • Exercise: Using phpnet
  • Variables
  • Variable Types
  • Variable Names (Identifiers)
  • Type Juggling and Casting
  • Hello Variables!
  • Exercise: First PHP Script
  • Variable Scope
  • Superglobals
  • Single Quotes vs Double Quotes
  • Concatenation
  • Passing Variables on the URL
  • Exercise: Passing Variables via the Query String
  • User-defined Functions (UDFs)
  • Defining and Calling Functions
  • Default Values
  • Variable Scope
  • By Reference vs By Value
  • Introduction to the Poet Tree Club
  • Including Files
  • require
  • require_once
  • Exercise: Using Header and Footer Includes
  • Constants
  • Error Reporting
  • Exercise: Displaying Errors
  • Including a Secure Configuration File
  • Exercise: Including a Configuration File

PHP Conditionals

  • if / if - else / if - elseif - else
  • Simple if Condition
  • if-else Condition
  • if-elseif-else statement
  • False Equivalents: Falsy Values
  • Testing for Variable Existence
  • Exercise: Checking for Variable Existence
  • switch/case
  • Exercise: Working with Conditions
  • Ternary Operator
  • Exercise: The Ternary Operator
  • Null Coalescing Operator

Arithmetic Operators and Loops

  • Arithmetic Operators
  • The Modulus Operator
  • Loops
  • while
  • dowhile
  • for
  • break and continue
  • Exercise: Working with Loops


  • Indexed Arrays
  • Initializing Arrays
  • Appending to an Array
  • Reading from Arrays
  • Looping through Arrays
  • Exercise: Working with Indexed Arrays
  • Associative Arrays
  • Initializing Associative Arrays
  • Reading from Associative Arrays
  • Looping through Associative Arrays
  • Superglobal Arrays
  • Exercise: Working with Associative Arrays
  • Multi-dimensional Arrays
  • Reading from Two-dimensional Arrays
  • Looping through Two-dimensional Arrays
  • Two-dimensional Associative Arrays
  • Non-tabular Multi-dimensional Arrays
  • Array Manipulation Functions
  • in_array() Function
  • Exercise: Array Practice

Working with Databases

  • Objects
  • Attributes / Properties
  • Behaviors / Methods
  • Classes vs Objects
  • Connecting to a Database with PDO
  • Introducing the Poetree Database
  • phpMyAdmin
  • Querying Records with PHP
  • Exercise: Creating a Single Poem Page
  • Queries Returning Multiple Rows
  • Exercise: Creating the Poems Listings
  • Exercise: Adding Pagination
  • Exercise: Sorting
  • Exercise: Filtering
  • Exercise: Adding Filtering Links to the Single Poem Page

Exception Handling

  • Uncaught Exceptions
  • Throwing Your Own Exceptions
  • Catching Exceptions
  • Getting Information about Exceptions
  • Exercise: Division Form
  • PDOExceptions
  • Exercise: Logging Errors
  • Exercise: The dbConnect() Function
  • When Queries Fail to Execute
  • Exercise: Catching Errors in the PHP Poetry Website

PHP and HTML Forms

  • HTML Forms
  • How HTML Forms Work
  • Form Submissions
  • Sanitizing Form Data
  • htmlspecialchars()
  • htmlentities()
  • filter_var()
  • filter_input()
  • Validating Form Data
  • Was the Field Filled In?
  • Is the Entered Value an Integer?
  • Is it an Email?
  • Is it a Valid Password and Do the Passwords Match?
  • Do the Combined Values Create a Valid Date?
  • Did the User Check the Box?
  • Exercise: Processing Form Input

Sending Email with PHP

  • mail()
  • Shortcomings of mail()
  • Setting Up PHPMailer
  • Get and Install the Latest Version of PHPMailer
  • Mail Server
  • Exercise: Including a Mail Configuration File
  • Sending Email with PHPMailer
  • PHPMailer Methods and Properties
  • Exercise: Creating a Contact Form

Authentication with PHP and SQL

  • The Registration Process
  • Passwords and Pass Phrases
  • Registration with Tokens
  • Exercise: Creating a Registration Form
  • Sessions
  • Session Variables
  • Cookies
  • Exercise: Logging in
  • Logging Out
  • $_REQUEST Variables
  • Exercis9: Resetting the Pass Phrase

LAB: Inserting, Updating, and Deleting Poems

  • Exercise: Submitting a New Poem
  • Exercise: Editing an Existing Poem
  • Exercise: Deleting a Poem

Uploading Files

  • Uploading Images via an HTML Form
  • Resizing Images
  • Exercise: Uploading a Profile Picture
View Full Schedule