Photo of the PHP and MySQL book cover

About This Book

PHP is 25 years old so there are lots of PHP tutorials online, but it is hard to piece together what you need to learn and tell if the information is up to date.

That's why we wrote this new book about PHP from scratch. This is our take on what you need to learn to start reading and writing PHP in 2022.

Our unique, visual approach (which made our other books best-sellers) is designed to simplify complex topics and make them seem less intimidating.

Bite-Sized Examples

Basic concepts are introduced using bite-sized code examples.

Two pages of PHP and MySQL book showing code examples

Visual Explanations

Diagrams and infographics help explain complex topics.

Two pages of PHP and MySQL book showing code examples

Full Example Website

To apply what you learn, you will build an entire sample website.

Two pages of PHP and MySQL book showing code examples

Table of Contents

Section A

Basic Programming Instructions

Learn to program using PHP. No programming experience is required (but basic HTML & CSS will help).

  • Chapter 1: Variables, Expressions & Operators
  • Chapter 2: Control Structures
  • Chapter 3: Functions
  • Chapter 4: Objects & Classes

Section B

Dynamic Web Pages

Discover the tools PHP gives you to create dynamic web pages, which can display different content each time they are viewed.

  • Chapter 5: Built-In Functions
  • Chapter 6: Getting Data From Browsers
  • Chapter 7: Images & Files
  • Chapter 8: Dates & Times
  • Chapter 9: Cookies & Sessions
  • Chapter 10: Error Handling

Section C

Database-Driven Websites

Learn to build database-driven websites, that have pages that are created using data stored in a database.

  • Chapter 11: Structured Query Language
  • Chapter 12: Get & Show Data From a Database
  • Chapter 13: Updating Data in a Database

Section D

Extending the Sample Application

Build on what you have learned and create a site packed with features seen on many popular websites.

  • Chapter 14: Refactoring & Dependency Injection
  • Chapter 15: Namespaces & Libraries
  • Chapter 16: Membership
  • Chapter 17: Adding Functionality