PHP & MySQL: free course
Build dynamic websites: forms, databases, logins and M-Pesa-ready back ends with PHP and MySQL.
Start lesson 1 Open the interactive course Printable course notes
Lessons
- 1 PHP introduction: what PHP is, how server-side code works, who uses it and setting up your computer
- 2 Variables, data types, strings and numbers: everything you need to store and format data in PHP
- 3 Arrays, conditions and loops: lists, associative arrays, if/else, match, for, foreach, while and array functions
- 4 Functions, includes and organising a PHP site
- 5 Object-oriented PHP: classes, interfaces and namespaces
- 6 Forms and security: GET and POST, validation, XSS, CSRF, sending email and safe form handling
- 7 MySQL with PDO: connecting safely, prepared statements, fetching rows, inserting, transactions and error handling
- 8 Build a CRUD app with PHP and MySQL (create, read, update, delete)
- 9 Sessions and a secure login system: cookies, sessions, password hashing, registration, roles and protection against attacks
- 10 Secure file uploads (images and documents)
- 11 Build a JSON API with PHP
- 12 Composer, packages and frameworks: from plain PHP to Laravel
- 13 M-Pesa STK push with PHP: Daraja setup, access tokens, STK push, callbacks, verification and going live
- 14 Project: an appointment booking system
- 15 Deploying a PHP and MySQL site to cPanel hosting: upload, database, config, HTTPS, emails, backups and going live