Codeskill

Learn to code, step by step

Going further with PHP

Going further with PHP picks up where An introduction to PHP left off. It assumes you have worked through An introduction to PHP and are comfortable with syntax, forms, sessions, a basic MySQL connection, and the OOP intro (classes, properties, methods).

The beginner series got you writing PHP that works. These tutorials are about structure: folders that make sense, Composer for dependencies, prepared statements everywhere, a simple router, and the boring security habits that stop small projects becoming embarrassing.

We build toward two mini projects at the end – a CRUD app with login and a small JSON API. No Laravel, no Symfony, no magic framework. Plain PHP with patterns you can understand and carry into any codebase.

You will need PHP 8.1 or newer, Composer, and a local stack (XAMPP, Laravel Herd, Docker, whatever you already use). MySQL comes up again for prepared statements and the CRUD project, but we assume you can create a database and run queries from the intro series.

Work through the tutorials in order when you can. Each one builds on the last. If sessions or basic OOP feel rusty, revisit those intro lessons first – there is no shame in checking the basics.

  1. PHP project layout that does not turn into spaghetti
  2. Composer and autoloading
  3. OOP in practice – interfaces, traits, dependency injection
  4. Error handling and logging properly
  5. Talking to MySQL safely – prepared statements everywhere
  6. Building a simple router (front controller)
  7. Forms, validation, and flash messages as a system
  8. Authentication basics – passwords, sessions, logout
  9. Authorisation – roles and can this user do X?
  10. File uploads securely
  11. Mail and notifications without painting yourself into a corner
  12. Working with APIs from PHP (curl/HTTP clients)
  13. Twig or plain PHP templates – keeping HTML out of logic
  14. Config, environments, and secrets
  15. Mini project: CRUD app with login
  16. Mini project: small JSON API