Portal Home > Knowledgebase > Articles Database > Order Form


Order Form




Posted by TrouperXI, 01-13-2010, 09:05 PM
Hi there, I'm trying to create a form which will be an order form, but i'm new to php and I'm having some problems. I would like to know how can i "link" costs to the values, so it can return to me a final price. Ex: i would like to give "One Way" - 50€ + Passengers 1-4 - 20€ and Holiday Destination Faro - 10€, and in the end i could get the total price. My Form code: I hope someone could help me. Thank you.

Posted by pwalters09, 01-14-2010, 01:33 AM
Hi, You have a few options available for this, 1) You could use a MySQL database, in the form post data that you can link to MySQL table and fetch costs, then add them up using php variables (ie: $total = $price1+$price2; etc) 2) Post the actual costs in the form and again on the final page add them up using PHP A simple google of 'adding up in php' will give you info on doing sums, and a simple google of 'fetch data from mysql with php' will give you the info you need to fetch costs from MySQL Let me know if you need further help

Posted by TrouperXI, 01-14-2010, 06:49 AM
Thanks, I will google it.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read