List All Tasks
Learn how to use the “SELECT” statement to read data from the database and how we can use the “foreach” to loop over selected data and display it to the user.
We'll cover the following
Slowly but surely, our project is expanding. Now, let’s create a basic landing page for it.
Landing page
In the index.php
file, we’ll add the following code snippet into the body:
<h2> theTrackerApp </h2>
<nav>
<ul>
<li><a href="./project_list.php">Projects list</a></li>
<li><a href="./task_list.php">Tasks list</a></li>
</ul>
</nav>
<div>
<p>tracks time spent on your projects and tasks</p>
</div>
Now we can fetch the tasks’ data from our database. This won’t be difficult because we’ll be conducting the same operation from the previous lesson, which we used for fetching all the projects in the database.
Get hands-on with 1400+ tech skills courses.