PHP Private

PHP and MySQL Training (PHP501)

Course Length: 5 days

This course provides a comprehensive introduction to developing dynamic, data-driven web applications using PHP and MySQL.

PHP and MySQL Training

Register or Request Training

  • Private class for your team
  • Live expert instructor
  • Online or on‑location
  • Customizable agenda
  • Proposal turnaround within 1–2 business days

Course Overview

This course provides a comprehensive introduction to developing dynamic, data-driven web applications using PHP and MySQL. Participants will gain foundational skills in both relational database design and server-side scripting, learning how to integrate PHP with MySQL to create interactive and robust web solutions. The course covers everything from basic SQL queries to advanced PHP functionalities, equipping learners with the tools needed to build real-world applications.

The course begins with Relational Database Basics, where you'll learn about the fundamentals of SQL, relational databases, and key concepts such as tables, rows, columns, primary and foreign keys, and popular database management systems. This module establishes the foundation necessary to understand how data is stored and managed within relational databases.

In Simple SELECTs, you will explore the basics of querying data with SQL. Topics include selecting columns, sorting records, using the WHERE clause for filtering, and working with logical operators. This section is designed to provide a strong grasp of how to retrieve and manipulate data within a MySQL database.

Advanced SELECTs delves deeper into SQL with calculated fields, aggregate functions, and grouping techniques. You will learn to manipulate data using built-in math, string, and date functions, and how to extract distinct records. This module enhances your ability to perform more complex data operations and analysis.

The Subqueries, Joins, and Unions module covers advanced data retrieval techniques. You will learn to work with subqueries, joins, and unions, understanding how to combine data from multiple tables to produce more comprehensive query results.

Next, the course transitions to PHP Basics, introducing you to server-side scripting. You’ll learn how PHP interacts with HTML, explore variable handling, write basic scripts, and understand the significance of including files. This module lays the groundwork for dynamic content generation and server-side logic.

In PHP Conditionals, you will learn how to control the flow of your application using if statements, switch/case, and ternary operators. Understanding conditionals is crucial for decision-making in code, allowing for more responsive and interactive applications.

Arithmetic Operators and Loops will guide you through using arithmetic operations and implementing loops in PHP. You will understand how to iterate through data sets and control repetitive tasks, enhancing the efficiency of your code.

The Arrays module introduces indexed, associative, and multidimensional arrays, along with key array manipulation functions. This section will help you understand how to store and access complex data structures efficiently.

In Working with Databases, you’ll learn how to connect PHP with MySQL using PDO, manage queries, and handle data effectively. Topics include pagination, sorting, and filtering data to ensure that your applications can interact seamlessly with a MySQL database.

Exception Handling focuses on managing errors in PHP. You’ll learn how to catch and handle exceptions, log errors, and ensure your applications are resilient to unexpected issues, providing a smoother user experience.

The PHP and HTML Forms module covers how to process user input through forms, including sanitizing and validating data to ensure it is safe and reliable. This section is critical for building interactive and secure web applications.

In Sending Email with PHP, you’ll explore techniques for sending emails using PHP's mail() function and PHPMailer, an advanced library for managing email communication within web applications.

Authentication with PHP and SQL covers user registration, session management, and secure login/logout processes. You will learn how to authenticate users and manage cookies to keep your applications secure.

The course also includes a comprehensive lab, where you will apply your PHP and MySQL skills to build a functional web application that allows users to manage content dynamically.

Uploading Files will guide you through handling file uploads securely, including image resizing and managing user profile pictures. This module ensures you can safely handle and process file data within your applications.

Finally, the Admin Site module demonstrates how to create a backend interface for managing content and users, including permissions, approvals, and other administrative functions.

By the end of this course, you will have a solid foundation in PHP and MySQL, empowering you to build dynamic, data-driven web applications with robust server-side logic and database integration.

Course Benefits

  • Learn how PHP works.
  • Learn the basic syntax of PHP.
  • Learn to create dynamic interactive pages with PHP.
  • Learn to manipulate files with PHP.
  • Learn to work with arrays in PHP.
  • Learn to validate forms with PHP.
  • Learn to write functions in PHP.
  • Learn to manipulate and manage database data with PHP.
  • Learn to authenticate users with PHP.
  • Learn to manage sessions with PHP.
  • Learn to work with the MDB2 package.
  • Learn advanced form validation with regular expressions.
  • Learn to send email with PHP.
  • Understand how MySQL works.
  • Learn to use SQL to output reports with MySQL.
  • Learn to modify MySQL data with SQL.

Delivery Methods

Private Class
Delivered for your team at your site or online.

Course Outline

  1. Relational Database Basics
    1. Brief History of SQL
    2. Relational Databases
    3. Tables
      1. Rows
      2. Columns
      3. Relationships
      4. Datatypes
      5. Primary Keys
      6. Foreign Keys
      7. Relational Database Management System
    4. Popular Databases
      1. Commercial Databases
      2. Popular Open Source Databases
    5. SQL Statements
      1. Database Manipulation Language (DML)
      2. Database Definition Language (DDL)
      3. Database Control Language (DCL)
  2. Simple SELECTs
    1. Introduction to the Northwind Database
    2. Some Basics
      1. Comments
      2. Whitespace and Semi-colons
      3. Case Sensitivity
    3. SELECTing All Columns in All Rows
    4. SELECTing Specific Columns
    5. Sorting Records
      1. Sorting by a Single Column
      2. Sorting By Multiple Columns
    6. Ascending and Descending Sorts
    7. The WHERE Clause and Logical Operator Symbols
      1. Checking for Equality
      2. Checking for Inequality
    8. Checking for Greater or Less Than
    9. Checking for NULL
    10. WHERE and ORDER BY
    11. Checking Multiple Conditions with Boolean Operators
      1. AND
      2. OR
      3. Order of Evaluation
    12. The WHERE Clause and Logical Operator Keywords
      1. The BETWEEN Operator
      2. The IN Operator
      3. The LIKE Operator
      4. The NOT Operator
  3. Advanced SELECTs
    1. Calculated Fields
      1. Concatenation
      2. Mathematical Calculations
      3. Aliases
    2. Aggregate Functions and Grouping
      1. Aggregate Functions
      2. Grouping Data
    3. Selecting Distinct Records
    4. Built-in Data Manipulation Functions
      1. Common Math Functions
      2. Common String Functions
      3. Common Date Functions
  4. Subqueries, Joins and Unions
    1. Subqueries
    2. Joins
      1. Table Aliases
      2. Multi-table Joins
    3. Outer Joins
    4. Unions
      1. UNION ALL
      2. UNION Rules
  5. PHP Basics
    1. Welcome to the Server-side
    2. Adding PHP Files to VS Code Workspace
    3. Google Chrome DevTools: Network Tab
    4. Review of DevTools Network Tab
    5. How PHP Works
    6. PHP Functions
    7. php.net
    8. Using php.net
    9. Variables
    10. Preparing to Write Your First PHP Code - Part 1
    11. Preparing to Write Your First PHP Code - Part 2
    12. Preparing to Write Your First PHP Code - Part 3
    13. First PHP Script
    14. Variable Scope
    15. Single Quotes vs. Double Quotes
    16. Concatenation
    17. Passing Variables on the URL
    18. User-defined Functions (UDFs)
    19. Local and Global Variables
    20. Passing Arguments by Value vs. by Reference
    21. Introduction to the Poet Tree Club
    22. Including Files
    23. Using Header and Footer Includes
    24. Constants
    25. Error Reporting
    26. Displaying Errors
    27. Including a Secure Configuration File
    28. Comments
    29. PHP Statements and Whitespace
  6. PHP Conditionals
    1. if / if - else / if - elseif - else
    2. Introduction to Conditionals
    3. False Equivalents: Falsy Values
    4. Testing for Variable Existence
    5. switch/case
    6. Ternary Operator
    7. The Ternary Operator
    8. Null Coalescing Operator
  7. Arithmetic Operators and Loops
    1. Arithmetic Operators
    2. The Modulus Operator
    3. Loops
    4. Modulus and Loops
  8. Arrays
    1. Indexed Arrays
    2. Working with Indexed Arrays
    3. Associative Arrays
    4. Superglobal Arrays
    5. Multi-dimensional Arrays
    6. Array Manipulation Functions
    7. in_array() Function
  9. Working with Databases
    1. Objects
    2. Attributes / Properties
    3. Behaviors / Methods
    4. Classes vs. Objects
    5. Connecting to a Database with PDO
    6. Introducing the Poetree Database
    7. phpMyAdmin
    8. Querying Records with PHP
    9. Queries Returning Multiple Rows
    10. Adding Pagination
    11. Sorting
    12. Anticipating Foul Play
    13. Filtering
  10. Exception Handling
    1. Uncaught Exceptions
    2. Throwing Your Own Exceptions
    3. Catching Exceptions
    4. Exceptions
    5. Division Form
    6. PDOExceptions
    7. Logging Errors
    8. The dbConnect() Function
    9. When Queries Fail to Execute
    10. Preparing for the Catching Errors Exercise
    11. Catching Errors in the PHP Poetry Website
  11. PHP and HTML Forms
    1. Form Submissions
    2. Sanitizing Form Data
    3. Validating Form Data
    4. Processing Form Input: Trimming
    5. Processing Form Input: Filtering
    6. Processing Form Input: Validating Fields
    7. Processing Form Input: Submission Response
    8. Processing Form Input: Remembering Form Entries
  12. Sending Email with PHP
    1. mail()
    2. Setting Up PHPMailer
    3. Mail Server
    4. Including a Mail Configuration File
    5. Sending Email with PHPMailer
    6. PHPMailer Methods and Properties
    7. Creating a Contact Form
  13. Authentication with PHP and SQL
    1. The Registration Process
    2. Passwords and Pass Phrases
    3. Registration with Tokens
    4. Creating a Registration Form
    5. Sessions
    6. Cookies
    7. Logging In and Out
    8. $_REQUEST Variables
    9. Resetting the Pass Phrase Introduction
  14. LAB: Inserting, Updating, and Deleting Poems
    1. Submitting a New Poem
    2. Showing All User’s Poems in on the Poems Page
    3. Editing an Existing Poem
    4. Deleting a Poem
  15. Uploading Files
    1. Enabling File Info Functions on Windows
    2. Uploading Images via an HTML Form
    3. Resizing Images
    4. Uploading a Profile Picture
    5. Uploading Files
  16. Admin Site
    1. Adding the Admin Pages
    2. Creating the isAdmin() Function
    3. Completing the Admin Home Page
    4. Completing the Admin Poems Page
    5. Approving, Editing, and Deleting Poems
    6. Completing the Admin Users Page
    7. Make the My Account Page Spoofable

Class Materials

Each student receives a comprehensive set of materials, including course notes and all class examples.

Class Prerequisites

Experience in the following is required for this PHP class:

  • HTML

Experience in the following would be useful for this PHP class:

  • CSS
  • Basic Programming
  • XML

Have questions about this course?

We can help with curriculum details, delivery options, pricing, or anything else. Reach out and we’ll point you in the right direction.