INTRODUCTION to PHP and Mysql ACTIVITY FRANKONI PURCHASES TABLE

Total Page:16

File Type:pdf, Size:1020Kb

INTRODUCTION to PHP and Mysql ACTIVITY FRANKONI PURCHASES TABLE

INTRODUCTION TO PHP AND MySQL – ACTIVITY – FRANKONI PURCHASES TABLE

For this exercise, you should create a MySQL database. The MySQL database should be called frankoniX – where X is your unique identifier.

Frankoni T-Shirts purchases the t-shirts it sells from a range of suppliers.

Currently this data is stored in a purchases spreadsheet.

The data recorded includes:

 purchase no  supplierID (four digits ie. S000-S999)  date of purchase  quantity purchased  description of item  unit price

Here is the sample data:

Purchase Supplier Date Quanti Description Price No ID ty P100 S101 01/03/ 100 T-shirts Blue XL 4.52 10 P101 S102 01/03/ 30 T-shirts Red L 3.44 10 P102 S103 04/03/ 45 Assorted Band 0.60 10 Logos P103 S101 06/03/ 200 T-shirts Black L 4.70 10 P104 S101 07/03/ 150 T-shirts Black XL 4.60 10 P105 S104 10/03/ 190 T-shirts Blue L Long- 5.60 10 sleeved P106 S101 15/03/ 60 T-shirts Blue XL 4.52 10

0da8be820cb22217e45135556e33d41a.doc Version 1 Page 1 of 2 P107 S103 21/03/ 15 Assorted Band 0.60 10 Logos P108 S101 22/03/ 55 T-shirts Red L 3.70 10 P109 S105 22/03/ 50 Assorted Band 0.70 10 Logos P110 S102 22/03/ 40 T-shirts Blue L Long- 5.30 10 sleeved P111 S101 25/03/ 140 T-shirts Blue S 4.12 10 P112 S102 27/03/ 10 T-shirts Red XL 5.10 10 Long-sleeved P113 S101 28/03/ 15 Assorted Band 0.80 10 Logos P114 S102 30/03/ 25 T-shirts Blue XL 4.60 10

Tasks:

1. Create a backend MySQL database table to store these purchases. 2. Populate the table with the sample data. 3. Create a display.php script to display this data on a web page. Test it! 4. Create a newpurchase.html form and update.php script to add new purchase data to the table. 5. Review your solution. Does it perform as expected?

Remember:

You should create a new folder in your My PHP Sites folder called Frankoni_TShirts.

Then, create a new Dreamweaver site pointing to this folder. You will need to add Remote Info and Testing Server information, and create a new folder on the server Frankoni_TShirts to which you will publish.

0da8be820cb22217e45135556e33d41a.doc Version 1 Page 2 of 2

Recommended publications