Search⌘ K

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.

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.php file, and create the reusable functions normalize_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 in tour-crud.php.
  • Include the functions in the bootstrap.php script so they are available on
...