Skip to content
Happy Programming Guide
Start learning

PHP

Server-side PHP explained simply — forms, sessions, databases and the errors that stop beginners. Practical examples you can run on a local server.

23 guides

PHP

PHP and Databases

Connecting PHP to MySQL or PostgreSQL with PDO: prepared statements, fetching, transactions, error handling and the queries that make pages slow.

6 min read

PHP

PHP and AJAX

Send data between JavaScript and PHP without reloading the page: fetch, JSON endpoints, form handling, error responses and CSRF protection.

5 min read

PHP

Building a Complete PHP Project

Take PHP from loose files in a web root to a real project: Composer, autoloading, a front controller, routing, PDO, templates and…

5 min read

PHP

PHP Performance Optimization

Where PHP applications actually spend their time, how to measure before you optimise, and the fixes that matter: OPcache, N+1 queries, indexes…

5 min read

PHP

Working with APIs in PHP

Call a REST API from PHP with cURL or Guzzle, handle JSON and errors properly, add authentication, and build a small API…

4 min read

PHP

PHP PDO Explained With Examples

PDO is the standard way to talk to a database from PHP. Connecting, prepared statements that stop SQL injection, fetching rows, transactions…

5 min read

PHP

Introduction to PHP

What PHP is, how it differs from JavaScript, how a request becomes a page, and your first working script — with the…

5 min read

Keep going — pick your next guide

The fastest way to improve is to read one guide, then build the thing it describes. Start with the basics, or jump straight to a project.