We will display items in the shopping list. The first step is to retrieve items from the database.
In the /lib/lib.php
pakage, add a function getArticles($db, $id_list)
which returns an array containing all the items in the shopping list having as key primary $id_list
in descending order of primary keys. This way, the last items added will appear at the top of the list.
Test your function before continuing.
Using a bootstrap sheet, display the items in accordance with the presentation next:
Note the button on the right side of the table that allows you to delete an item. Insert the button, even though it is currently inactive.
The result of the display must be responsive.
At the top left of the page, add a small house that redirects to the page reception :