FIT3084 : PHP Script with Cookie
Produce a fill out form that allows a user to enter their name and then "place order" for a specified number of items by clicking on a button.
The possible items that could be ordered and their costs are given below in a table that resembles the one you will need for your order form.
Item | Cost | Number ordered |
thimbles | $3.50 | |
needles (set) | $5.00 | |
dress-maker's scissors | $12.00 | |
reels of cotton (blue) | $2.50 | |
reels of cotton (red) | $2.50 |
A PHP script should accept the order placement and calculate the total cost for the order, generating a second form to send back to the user.
The second form should show the complete order, its cost and provide an "accept order" button which sends data to a PHP script that replies "Thankyou". It should also show the order and give an expected delivery date 3 business days after the day of placing the order.
Use cookies to ensure that a user who interrupts the process or returns after placing an order can retrieve the state of their transaction without having to re-enter the data:
© Copyright Alan Dorin 2009