logo

PHP Course

course overview

download outline

Select Country and City to View dates & book now

Prerequisites

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

Outline

Outline of Introduction to PHP Training 1. 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

2. 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

3. Arithmetic Operators and Loops

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

4. Arrays

  • 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. LAB: Inserting, Updating, and Deleting Poems

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

11. Uploading Files

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

Talk to an expert

Thinking about Onsite?

If you need training for 3 or more people, you should ask us about onsite training. Putting aside the obvious location benefit, content can be customised to better meet your business objectives and more can be covered than in a public classroom. Its a cost effective option. One on one training can be delivered too, at reasonable rates.

Submit an enquiry from any page on this site and let us know you are interested in the requirements box, or simply mention it when we contact you.

All $ prices are in USD unless it’s a NZ or AU date

SPVC = Self Paced Virtual Class

LVC = Live Virtual Class

Please Note: All courses are availaible as Live Virtual Classes

Trusted by over 1/2 million students in 15 countries

Our clients have included prestigious national organisations such as Oxford University Press, multi-national private corporations such as JP Morgan and HSBC, as well as public sector institutions such as the Department of Defence and the Department of Health.