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 html><html><body>'; $table = 'purchases'; $results = $db->select_all($table); //start a new table structure and set the headings of our table: $html .= '<table><tr...