This is a discussion on "looking for job quote calculator" within the PHP Forum section. This forum, and the thread "looking for job quote calculator are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
looking for job quote calculator
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
looking for job quote calculator
been searching but can only ever find random quote scripts lol
im looking for a labour cost calculator script it is for a carpentry site, it needs to calculate a quote for the total labour cost of the items that the user selects from a list of predefined values. my client doesnt have sql so im gonna need a flat file script client is happy to pay for it but even happier if its free and able to be modified, im not the most experienced php'er so im not really able to write from scratch but would be happy at having a bash if someone could provide some guidance thanks in advance |
|
|
|
|||
|
Re: looking for job quote calculator
I don't know of any such script, but it shouldn't be too hard to code up.
I'd set up the data file as a tab-delimited file, with one column being the field name, and the other the cost for 1 "item" of that field. Then set up your form with the same field names. The php script would first read the data file, one line at a time, using explode() to split the values on each line, then saving them in an array keyed on the field name. So you can do something like $costs['boards'] and it'll come back as "5" or whatever. Set up $total_cost or something like that. Then loop through your array, looking in $_REQUEST for what the user entered in the form. If it's a positive number, add the value to $total_cost, i.e. $total_cost += ($costs['boards] * $_REQUEST['boards]) If you need to update things, you can add new values to the data file, and then make sure the fields in the form use the same names, and you should be good. |
|
|||
|
Re: looking for job quote calculator
client doesnt have sql, would have to be flat file?
|
|
||||
|
Re: looking for job quote calculator
Errm... didn't awatson provide a solution that does just that!
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Javascript calculator help with coding | Cat2008 | JavaScript Forum | 0 | May 1st, 2008 14:48 |
| Help with flash calculator... | lisafrench | Flash & Multimedia Forum | 0 | Jun 8th, 2007 20:08 |
| Popup calculator | masonbarge | PHP Forum | 1 | Apr 19th, 2007 02:08 |
| keypad calculator | pelachrum | JavaScript Forum | 1 | Aug 8th, 2005 22:26 |
| calculator through link? | pelachrum | Web Page Design | 1 | Aug 6th, 2005 08:26 |