Back-end & frameworks

PHP 8: build dynamic sites connected to a database

Master PHP, basic object-oriented programming, MySQL with PDO, sessions and authentication.

Request this program
Duration
28 h · 4 days
Level
Beginner
Format
On site · Remote · Blended
Max. group size
12 participants

Overview

This program teaches how to develop dynamic web applications in PHP. It starts from the language (variables, structures, functions), moves on to objects, forms, files and uploads, then access to MySQL with PDO. The last day covers sessions, authentication and the new features of PHP 8, as well as using AI to speed up development.

Who this program is for

  • Beginners in back-end development
  • Front-end developers moving to the server side
  • Career changers moving into web development

Prerequisites

  • Being able to write HTML
  • Notions of databases and programming appreciated

Learning objectives

  • Write structured PHP scripts
  • Handle arrays, strings, dates and regular expressions
  • Create classes and objects
  • Process forms with GET and POST
  • Handle files, JSON and secure uploads
  • Access MySQL with PDO and prepared statements
  • Manage sessions and authentication

Detailed curriculum

8 modules · 28 h · 4 days

Day 1
Language basics3.5 h
50% theory · 50% practice
  • Installing and configuring the environment
  • Variables, types and operators
  • Conditional structures and loops
  • Functions and scope
  • Including files
Arrays, strings and dates3.5 h🛠 1 workshop
30% theory · 70% practice
  • Indexed and associative arrays
  • Useful array functions
  • Strings and regular expressions
  • Dates and time zones
  • Organizing your code
🛠 Hands-on workshops
Guided exercises1.5 h

Solve a series of data manipulation exercises.

✅ Deliverable : A collection of scripts
Day 2
Object-oriented programming3.5 h
50% theory · 50% practice
  • Classes, properties and methods
  • Constructors and visibility
  • Inheritance and interfaces
  • Exception handling
  • Automatic class loading
Forms3.5 h🛠 1 workshop
30% theory · 70% practice
  • GET and POST methods
  • Retrieving and cleaning data
  • Validating fields on the server side
  • Displaying errors
  • Protecting pages from code injection
🛠 Hands-on workshops
Contact form1.5 h

Create a form processed and validated on the server side.

✅ Deliverable : A secure form
Day 3
Files, JSON and upload3.5 h
50% theory · 50% practice
  • Reading and writing files
  • Encoding and decoding JSON
  • Notions of XML
  • File upload with checks
  • Managing paths and permissions
Accessing MySQL with PDO3.5 h🛠 1 workshop
30% theory · 70% practice
  • Connecting with PDO
  • Prepared statements
  • Full CRUD
  • Transactions
  • Organizing a data access layer
🛠 Hands-on workshops
Contact management2 h

Develop the management interface for a table.

✅ Deliverable : A CRUD application
Day 4
Sessions and authentication3.5 h
50% theory · 50% practice
  • Sessions and cookies
  • Registration and login
  • Password hashing
  • Protecting pages
  • Logout and session duration
PHP 8 and AI assistants3.5 h🛠 1 workshop
30% theory · 70% practice
  • New in PHP 8: types, named arguments, match
  • Strict typing and promoted properties
  • Using AI to generate and review PHP code
  • Best practices and security
  • Capstone project
🛠 Hands-on workshops
Mini-project2 h

Assemble the building blocks into a small application with login.

✅ Deliverable : A complete application

Tools and technologies

HTML5MySQLPHPVisual Studio Code

Teaching methods

  • Alternating short lectures and hands-on work
  • Live demonstrations by the trainer
  • Capstone project built throughout the modules
  • Group corrections and discussion of best practices

Assessment

  • Hands-on exercises corrected in each module
  • Mini-project completed at the end of the course
  • Knowledge-check quiz

Required equipment

  • A computer with an internet connection
  • A local PHP/MySQL server (MAMP, XAMPP or Docker) and a code editor

Resources provided

  • Course materials and repository of corrected exercises

Career outcomes

  • A PHP application with a database and user login
  • Basic security reflexes
  • A foundation for learning Symfony or Laravel

Related video courses

My video courses that go with this program, to get ready for the training or to review afterwards. Free with an account.