PHP help please - doing maths !

Status
Not open for further replies.

adrian5750

New Member
HI Folks

A client's application might be solved by a bit of PHP programming... but I'd appreciate some guidance on the actual PHP...

The client sells 20 items - in batches of 8 for a fixed price. The customer can select which items, and how many of each - but whatever their choice the total needs to be 'n' x 8 items (i.e. 8, 16, 24 - and not 9, 14 etc...)

I've gained a little experience 'hacking' the php scripts that come with various web editors, and the form handler from formm@iler -
but how would I go about calculating the number of items selected from the form.....

I'd imagine each item having a drop-down list to select 0,1,2,3,4 of them,
I can pass all of that to the form handler script - but would then need to do maths on the items submitted and get a total no of items...

Any guidance as to how I'd code this - would be gratefully recieved!

Thanks in advance
Adrian
 
Status
Not open for further replies.
Top