PHP Tutorials
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...
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...
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...
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...
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 ...
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 ...
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 = '...
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...
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 ...
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...