FriconiX
Free collection of beautiful vector icons for your web pages.

Part 6. Displaying the shopping list

We will display items in the shopping list. The first step is to retrieve items from the database.

Retrieving items

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.

Displaying articles

Using a bootstrap sheet, display the items in accordance with the presentation next:

Table containing articles

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.

Back to home page

At the top left of the page, add a small house that redirects to the page reception :

Back to home button

See also


Last update : 02/03/2020