Introduction to PHP

Introduction to PHP

In this online PHP course, you will learn the basics of PHP, which is still one of the most widely used server-side languages on the web. You will start by learning how PHP works and its basic syntax. You will then learn to create dynamic interactive pages, to work with arrays, to process and validate forms, and to write functions in PHP.

3 Months Access / 32 Course Hrs
  • Details
  • Syllabus
  • Requirements

Details

In this PHP training course, you will learn the basics of PHP, which is still one of the most widely used server-side languages on the web. You will start by learning how PHP works and its basic syntax. You will then learn to create dynamic interactive pages, to work with arrays, to process and validate forms, and to write functions in PHP. This will give you the groundwork you need to move on to a more advanced course that covers database-driven websites with PHP and MySQL.

Enrollment Options:
Self-Guided
3 Months Access Course Code: T14527
No Instructor, Start Anytime
$129.00 USD

Syllabus

  1. PHP Basics
    1. Welcome to the Server-side
      1. What is a web server?
      2. Dynamic Websites
    2. Google Chrome DevTools: Network Tab
      1. Status Codes
    3. How PHP Works
      1. The php.ini File
      2. PHP Tags
      3. Hello, World!
    4. Comments
    5. PHP Statements and Whitespace
    6. PHP Functions
    7. php.net
    8. Variables
      1. Variable Types
      2. Variable Names (Identifiers)
      3. Type Juggling and Casting
      4. Hello Variables!
    9. Variable Scope
    10. Superglobals
    11. Single Quotes vs. Double Quotes
    12. Concatenation
    13. Passing Variables on the URL
    14. User-defined Functions (UDFs)
      1. Defining and Calling Functions
      2. Default Values
      3. Variable Scope
      4. By Reference vs. By Value
    15. Introduction to the Poet Tree Club
    16. Including Files
      1. require
      2. require_once
    17. Constants
    18. Error Reporting
    19. Displaying Errors
    20. Including a Secure Configuration File
  2. PHP Conditionals
    1. if / if - else / if - elseif - else
      1. Simple if Condition
      2. if-else Condition
      3. if-elseif-else statement
      4. False Equivalents: Falsy Values
    2. Testing for Variable Existence
    3. Exercise: Checking for Variable Existence
    4. switch/case
    5. Ternary Operator
    6. Null Coalescing Operator
  3. Arithmetic Operators and Loops
    1. Arithmetic Operators
    2. The Modulus Operator
    3. Loops
      1. while
      2. do...while
      3. for
      4. break and continue
  4. Arrays
    1. Indexed Arrays
      1. Initializing Arrays
      2. Appending to an Array
      3. Reading from Arrays
      4. Looping through Arrays
    2. Associative Arrays
      1. Initializing Associative Arrays
      2. Reading from Associative Arrays
      3. Looping through Associative Arrays
      4. Superglobal Arrays
    3. Multi-dimensional Arrays
      1. Reading from Two-dimensional Arrays
      2. Looping through Two-dimensional Arrays
      3. Two-dimensional Associative Arrays
      4. Non-tabular Multi-dimensional Arrays
    4. Array Manipulation Functions
    5. in_array() Function
  5. PHP and HTML Forms
    1. HTML Forms
      1. How HTML Forms Work
    2. Form Submissions
    3. Sanitizing Form Data
      1. htmlspecialchars()
      2. htmlentities()
      3. filter_var()
      4. filter_input()
    4. Validating Form Data
      1. Was the Field Filled In?
      2. Is the Entered Value an Integer?
      3. Is it an Email?
      4. Is it a Valid Password and Do the Passwords Match?
      5. Do the Combined Values Create a Valid Date?
      6. Did the User Check the Box?

Requirements

Prerequisites:

  • HTML
  • CSS is useful


Requirements:

Hardware Requirements:

  • This course can be taken on either a PC or Mac. Chromebooks are not compatible.

Software Requirements:

  • PC: Windows 8 or later.
  • Mac: macOS 10.10 or later.
  • Browser: The latest version of Google Chrome or Mozilla Firefox is preferred. Microsoft Edge and Safari are also compatible.
  • Adobe Acrobat Reader
  • Software must be installed and fully operational before the course begins. Setup instructions can be found here.

Other:

  • Email capabilities and access to a personal email account.

Instructional Material Requirements:

The instructional materials required for this course are included in enrollment and will be available online.