ClioSport.net

Register a free account today to become a member!
Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

PHP Help



  Golf GTD
Ive got to do a little PHP coding for a module at uni, and just cant get my head round it.

What ive got to do is create a customer order form for a super hero website.

You should write a PHP script which processes the information sent from the booking form. The script should be aware of the prices of the heroes and extras and should therefore calculate the total cost of the booking and add VAT at 17.5%. The HTML returned by the PHP script to the browser should display in the form of an invoice, confirming the name, address and telephone number of the customer and provide an itemised list of items with prices, a subtotal of ex-vat price, the amount of VAT due and a grand total. This itemised list should take the form of a HTML table.

Would anyone be able to point me in a direction or show me a little code that could help with the completion of this.

Thanks all.

Kyle
 
Are you allowed to use mysql? if not, put the heros and value into an array, just noticed the characters have extras too, so probably could do with a 3d array.

Store the item info from the form into different session variables. Validate all info before you store it though!

Once you're on the invoice page, just add the values from each of the items in the array used and add 17.5%

You should also add a registration section. You can then use the registrants details to automatically fill in their home address, phone number, etc
 
Doesn't seem too bad. Have you just been given this assignment and been told to go away and learn it?

Do what Nightfire said but make sure you write the code yourself because if you demo and have to explain portions of the code you will need to know whats going on. It doesn't seem to require a database backend so that makes it easier. Just use php to re-render the page depending on what has been ordered, ISSET is useful for re-drawing the page.

Good luck.
 


Top