Introduction
Learn what we’ll cover in this chapter.
We'll cover the following
Let’s start our journey by implementing the first two features of our CRUD application, which are represented by the letters “C” and “R.” In the next couple of chapters, we’ll learn how to create, read, and insert data.
What we’ll learn
In short, we’ll learn to:
- Fetch data from the database.
- Handle an HTML form submission with PHP.
- Insert data into the database.
What to expect
This chapter consists of the following lessons:
List All Tasks
This lesson consists of how to fetch tasks
from the tasks database table and display them in an unordered list with the help of the foreach
loop. The generated list is ordered by date.
Add a Project
In this lesson, we’ll start writing in the database. We’ll learn how to handle an HTML form and use the INSERT INTO SQL
statement in a PHP
program. We’ll specifically write code for inserting projects into the projects
table.
Add a Task
In this lesson, we’ll learn how to write code to insert tasks into the tasks
table.
Get hands-on with 1400+ tech skills courses.