November 19, 2026 - 10:56

Tutorials

PHP Tutorials PHP Lesson 01 — Run PHP Locally and Open Your First Page

Try opening a PHP file the same way you open an HTML file and you may see the code instead of a page. PHP needs to run first. Let’s get one page worki...

PHP Tutorials PHP Lesson 02 — List Tasks with Arrays and foreach

Print two tasks by hand Last time we put a heading on the page. Add these two entries in public/foreach-demo.php. Start PHP from the project folder wi...

PHP Tutorials PHP Lesson 03 — Read and Validate a Task Form

Add a box to the page In lesson two we opened the PHP file whenever we wanted to add a task. Let’s type a title in a box instead. First we’ll see what...

PHP Tutorials PHP Lesson 04 — Organize the Code with Functions and Files

Find the button text Search for Preview task in lesson three’s public/index.php. On the way you pass the form rules and the task array. Let’s move the...

PHP Tutorials PHP Lesson 05 — Create a MySQL Table and Read Tasks with PDO

Can the list change without editing PHP? In lesson four the tasks came from an array in index.php. Keep it for a moment while you create two tasks in ...

PHP Tutorials PHP Lesson 06 — Save a Task and Redirect Back to the List

The preview worked. Where is the row? Submit “Buy tea” in lesson five. The title appears in the preview. Run this query and look for it in MySQL. The ...

PHP Tutorials PHP Lesson 07 — Change a Task's Completion Status

Two tasks have the same title Use lesson six to add “Buy tea” twice and inspect the local table. SELECT id, title, done FROM tasks WHERE title = '...

PHP Tutorials PHP Lesson 08 — Filter Completed and Pending Tasks

Make two lists from one table In lesson seven, complete one task and leave another pending. Run these two statements in your MySQL query window. SELEC...

PHP Tutorials PHP Lesson 09 — Edit an Existing Task

Opening a task and saving it are separate jobs Complete a task in lesson eight and imagine that its title has a typo. The edit page needs to read the ...

PHP Tutorials PHP Lesson 10 — Test the Task List from Start to Finish

Could a small edit break our rule? Lesson nine’s task list runs. Suppose we accidentally remove trim() when revisiting the title rule. The page can st...