Explore BrainMass

PHP / AJAX Script to fetch member details and total purchases

1. There is an Access database called ImageMasters (that tracks the sales of a photo-selling company) with the tables (all fields text unless noted):
- T_Members (MemberId - autonumber, Surname, Forename, PTown, Pcode, Country)
- T_Images (Image_category, Image_price - number)
- T_Orders (DateOfOrder, ImageCategory, NoOfImages, OrderValue)

2. An orders web page has been written that needs to:
- fetch the member details (Forename, Firstname, PTown, Country) from the table T_Members when the memberid is provided and the button "Lookup Details" is clicked
- fetch the price of an image, multiply by the number of images and update the field labelled "$0.00 each" with the total price when the button "refresh total" is clicked

Required: Write a PHP and / or AJAX script that performs these functions, and appends a member's order to the table T_Orders. The orders web page and the database are attached.