Task Tracker
Add tasks, mark them complete, and delete them. Each task is saved in a database, so it remains after you close the browser.
Add a task
Your tasks
0 totalNo tasks yet. Add one above to see the app in action.
What happens when I click “Add task”?
- Your browser sends the form to
index.phpusing an HTTP POST request. - PHP runs on the hosting server. It reads the submitted task and validates it.
- PHP uses PDO and a prepared SQL statement to insert the task into MySQL.
- The server redirects the browser back to this page.
- PHP reads the tasks from MySQL and generates HTML. Your browser displays that HTML.
Try it: add a task, refresh the page, and open the site in another browser. The task is stored in MySQL, not just in this page.