By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,216 Members | 1,032 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,216 IT Pros & Developers. It's quick & easy.

PHP order form and calculations

100+
P: 164
Hey all you PHP gods and goddesses, I was hoping for a pointer for a tutorial, perhaps some teachings on creating an order form. I am not asking for a complete explanation by anyone here but was hoping you may be able to point me towards a tutorial online somewhere.

I found this... which is pretty much cut and try for what I need.
http://www.developingwebs.net/html/formcalculationsphp.php
Only the example at the bottom of the page doesn't calculate anything. I starting to read through it now but know how good it will be.

My end goal is to have a food menu with a few sections of different food items. I need to have a quantity box, and then a submit for total button that will do just that.

I am decent at picking things up so any pointers, or links to something that is along those lines would be amazing. Generally I would search a heck of a lot longer but this was kind of last minute and the issue is pressed for time!

so thank you very much in advance!
Feb 29 '08 #1
Share this Question
Share on Google+
8 Replies


ronverdonk
Expert 2.5K+
P: 4,258
Like this one?
PHP Tutorial: Order Form

Ronald
Feb 29 '08 #2

100+
P: 164
Like this one?
PHP Tutorial: Order Form

Ronald

Sorry I guess I should have specified.. I need the actual calculations to take place.

2 cakes at $5.00 each
5 muffins at $2.00 Each


---------------------------------------
Customers Oder Page:

You ordered

2 Cakes
5 Muffins

Your total is $20.00 Thank you.

________________________________

Something along those lines.. I ran through that link I gave earlier and I am getting the output as theirs.. They have variable holding prices in the script, it just doesnt calculate it
???

Thank you for the quick response though!
Feb 29 '08 #3

Markus
Expert 5K+
P: 6,050
Have a look at php operators.

[php]
$_x = 1;
$_y = 3;
echo $_x + $_y;
[/php]
Feb 29 '08 #4

ronverdonk
Expert 2.5K+
P: 4,258
Sorry I guess I should have specified.. I need the actual calculations to take place.

2 cakes at $5.00 each
5 muffins at $2.00 Each


---------------------------------------
Customers Oder Page:

You ordered

2 Cakes
5 Muffins

Your total is $20.00 Thank you.

________________________________

Something along those lines.. I ran through that link I gave earlier and I am getting the output as theirs.. They have variable holding prices in the script, it just doesnt calculate it
???

Thank you for the quick response though!
So what do you expect us to do? Teach you how to program calculations? Make you an order form? You'll have to start programming yourself. When you run into trouble with that, show us and we will try to help you.

Ronald
Mar 1 '08 #5

100+
P: 164
So what do you expect us to do? Teach you how to program calculations? Make you an order form? You'll have to start programming yourself. When you run into trouble with that, show us and we will try to help you.

Ronald
I am not sure if you read my original post where I said exactly this..

"I am not asking for a complete explanation by anyone here but was hoping you may be able to point me towards a tutorial online somewhere."

and then this..
"Generally I would search a heck of a lot longer but this was kind of last minute and the issue is pressed for time!"

I am not trying to sound to sound like some idiot who mooches off the forums. After sifting through the link I originally posted, and the one that you and markusn00b posted I got a generalized idea on how to perform what I need done.

So thanks a lot guys.
Mar 1 '08 #6

Markus
Expert 5K+
P: 6,050
I am not sure if you read my original post where I said exactly this..

"I am not asking for a complete explanation by anyone here but was hoping you may be able to point me towards a tutorial online somewhere."

and then this..
"Generally I would search a heck of a lot longer but this was kind of last minute and the issue is pressed for time!"

I am not trying to sound to sound like some idiot who mooches off the forums. After sifting through the link I originally posted, and the one that you and markusn00b posted I got a generalized idea on how to perform what I need done.

So thanks a lot guys.
He wasn't grilling you :)
you're welcome
Mar 1 '08 #7

100+
P: 164
He wasn't grilling you :)
you're welcome
yeah he probably wasn't. I just wanted to make it clear I was not expecting such things at all. The script is working NICE by the way...
Mar 1 '08 #8

Markus
Expert 5K+
P: 6,050
yeah he probably wasn't. I just wanted to make it clear I was not expecting such things at all. The script is working NICE by the way...
Good luck with your project!

Post back whenever!
Mar 1 '08 #9

Post your reply

Sign in to post your reply or Sign up for a free account.