This week we start to explore how SQL databases can integrate with webpages. This seems like arcane technology and in fact is pretty straightforward in terms of technique, however it is important to consider the power of this technology. The largest and fastest growing companies in the world today - Google, Facebook, Amazon – are basically just web databases.
Some of the PHP and programming concepts may be very new to some of you, or may be review for others, but I find it useful to review both of these chapters as these authors offer very clear explanations of many of the techniques involved in using web database servers. The HTML may be new to some of you, but the code samples in the book should be sufficient to get started. You can review the parts of chapter 14 about command line PHP and PHPMYADMIN quickly as they are beyond the scope of this class.
Your PHP files need to be uploaded to your server account on student.santarosa.edu using any FTP software – they will not run on your local system. The database server is running on the webserver itself, so you can refer to it as localhost. Here is a version of the example PHP webpage on page 406-407 using my account on the SRJC student server.
Assignments – Due May 12
- Reading and exercises in Chapters 13 & 14
- Project 4 – A Database report on a webpage
Create a PHP page that lists the following information from your MySQL database created in Project 3:
BRANCH SALESPERSON TOTAL SALES ordered by TOTAL SALES
Create a second PHP page that lists each sales transaction to date for a salesperson. CUSTOMER VARIETY VINTAGE TOTAL SALE ordered by VINTAGE. Make the salesperson’s name value on the first page a link to the second PHP webpage listing all sales for that salesperson.
- Quiz 4