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.
Instructor(s):Self-Study
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.
Hide Syllabus
Lesson 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 php.ini File
- PHP Tags
- Hello, World!
- Comments
- PHP Statements and Whitespace
- PHP Functions
- php.net
- Variables
- Variable Types
- Variable Names (Identifiers)
- Type Juggling and Casting
- Hello Variables!
- Variable Scope
- Superglobals
- Single Quotes vs. Double Quotes
- Concatenation
- Passing Variables on the URL
- 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
- Constants
- Error Reporting
- Displaying Errors
- Including a Secure 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
- Ternary Operator
- Null Coalescing Operator
- Arithmetic Operators and Loops
- Arithmetic Operators
- The Modulus Operator
- Loops
- while
- do...while
- for
- break and continue
- Arrays
- Indexed Arrays
- Initializing Arrays
- Appending to an Array
- Reading from Arrays
- Looping through Arrays
- Associative Arrays
- Initializing Associative Arrays
- Reading from Associative Arrays
- Looping through Associative Arrays
- Superglobal 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
- 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?
Hide Syllabus