Project Challenge: Edit and Delete Tasks
Explore how to add editing and deleting task features in a PHP CRUD application. Learn to create reusable functions, validate inputs, manage tasks data, and enforce user authentication to secure edits and deletions. By the end, you will handle POST requests and data persistence for task management effectively.
We'll cover the following...
We'll cover the following...
Problem statement
In this chapter, we looked at editing and deleting data. Now, we will add these features to the task management application.
Tasks:
- Create a
pages/functions/task-crud.phpfile, and create the reusable functionsnormalize_submitted_data(),validate_normalized_data(),load_all_tasks_data(),save_all_tasks_data(). They will be very similar to the functions we have created in this chapter intour-crud.php. - Include the functions in the
bootstrap.phpscript so they are available on