calculating from form


#1

Hi

I am trying to make a form that would calculate a price according to the users choises. Say, I have two check boxes with different values which would count if they where selected, and two text fields where the user could enter a number eg “5 eggs”, which would multiply with a price of one egg. After hitting “submit” I would like to get the total of all the choises in one summ.

I tried to search the net but maybe I am just dumm but could not find any simple answer to this.

B.W. Romu


#2

Contrary to popular belief, PHPHelp.com isn’t a checkout booth for custom scripts. One way or the other, you’re gonna have to code it yourself :slight_smile: But to get you on your way, here are some pointers:

Basic syntax
External variables
Arithmetic functions

I don’t know what you already know, what you don’t know, what you’ve tried, and what worked and what didn’t, and any errors you got, so I can’t help you too much and have to assume that you know nothing about PHP (in which case I’d reccomend you to search for some tutorials, rather than coming here and asking for a script).