Laroo-Pece Division, Gulu City, Northern Uganda
Uganda time
Web development - Advanced

Web Applications with PHP and MySQL

Build secure, database-driven web applications with PHP 8 and MySQL: forms, sessions, PDO, CRUD, login, safe uploads, MVC-style structure, JSON APIs and deployment on shared hosting.

About this course

PHP and MySQL power a large share of the websites that Ugandan businesses, schools and organisations use every day, from small shops to large content systems. Knowing how to build a proper database-driven application in PHP is a practical skill that local employers and freelance clients ask for, and shared hosting that runs PHP is cheap and widely available.

This course takes you from a working XAMPP set-up to a deployed application. You will write modern PHP 8 code, handle forms and sessions, talk to MySQL with PDO and prepared statements, build create, read, update and delete (CRUD) screens, register and log in users with password_hash, and defend your code against the most common attacks: cross-site scripting (XSS), cross-site request forgery (CSRF) and SQL injection. You will then organise code in an MVC-style structure with simple routing, add JSON endpoints, and put the finished application on shared hosting.

The course assumes you can write HTML and CSS, understand tables and queries in SQL, and know basic JavaScript. Security is taught throughout, not as an afterthought, because a web application that works but is not safe is a liability to the people who trust it with their data.

What you will learn

  • Install and run a local PHP and MySQL development environment with XAMPP.
  • Write PHP 8 code using variables, arrays, functions, classes and control flow, and process HTML forms.
  • Connect to MySQL with PDO and use prepared statements for every query.
  • Build complete create, read, update and delete screens with validation and the post-redirect-get pattern.
  • Register and log in users securely with sessions and password_hash, and protect pages.
  • Prevent XSS, CSRF and SQL injection and handle file uploads safely.
  • Organise an application with includes, controllers, views, models and a front-controller router, and expose JSON endpoints.
  • Configure errors, secrets and deployment so the application runs safely on shared hosting.

Course content

5 modules · 18 lessons · 5 h 44 min · 6 quizzes

Module 1: Your development environment and PHP fundamentals4 lessons

Install XAMPP, run your first PHP page, learn the core language and receive data from HTML forms safely.

  1. Setting up XAMPP and running your first PHP page 16 min
  2. PHP syntax: variables, types and strings 17 min
  3. Control flow, arrays and functions 18 min
  4. Handling HTML forms: GET, POST and safe output 18 min
  5. Quiz: 8 questions
Module 2: Databases with PDO4 lessons

Create MySQL tables, connect from PHP with PDO and build complete create, read, update and delete screens using prepared statements.

  1. MySQL, phpMyAdmin and designing a table 17 min
  2. Connecting with PDO and prepared statements 20 min
  3. CRUD, part 1: create and read 20 min
  4. CRUD, part 2: update and delete 19 min
  5. Quiz: 8 questions
Module 3: Users, security and uploads4 lessons

Register and log in users with sessions and password hashing, then defend against XSS, CSRF and SQL injection and handle file uploads safely.

  1. Sessions and secure registration and login 22 min
  2. Validation and cross-site scripting (XSS) 19 min
  3. CSRF protection and a recap of SQL injection defences 20 min
  4. Handling file uploads safely 20 min
  5. Quiz: 8 questions
Module 4: Structure, routing and APIs3 lessons

Organise a growing application with includes, controllers, views and models, route requests through one entry point and publish JSON endpoints.

  1. Structuring code: includes, helpers and an MVC-style layout 20 min
  2. Routing with a front controller 18 min
  3. REST-style JSON endpoints 20 min
  4. Quiz: 8 questions
Module 5: Configuration, deployment and a finished project3 lessons

Configure errors and secrets properly, deploy to shared hosting and bring everything together with a final project checklist.

  1. Configuration, errors, logging and secrets 18 min
  2. Deploying to shared hosting 20 min
  3. Final project: a members' notice board 22 min
  4. Quiz: 8 questions
Final exam

29 questions. Pass with 70% or more to earn your certificate.

What you need

  • Completion of Web Basics: Build Your First Web Page (HTML and CSS)
  • Completion of Databases and SQL for Beginners
  • Completion of JavaScript for Beginners: Make Web Pages Interactive
  • A Windows, Mac or Linux computer on which you may install software (XAMPP)

Further reading

To install on iPhone or iPad: tap the Share button in Safari, then choose "Add to Home Screen".