Admin for managing purchases

We'll be building the admin system for handling all our purchases. This is in order to keep track of each customer that bought something from our site. It will consist of two pages:

  • An overview of all customers who purchased something
  • Being able to view the items purchased by a customer

We will also be adding some features to these pages in order to make it easier for an admin to make changes to a customer's information.

We'll also create a simple  htaccess apache rule in order to block other people from accessing our admin site, because it contains highly sensitive data.

Let's first start selecting all the data inside our purchases table:

<?php //create an html variable for printing the html of our page: $html = '<!DOCTYPE ...

Get PHP 7 Programming Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.