looking for job quote calculator

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 13th, 2008, 11:32
Junior Member
Join Date: Apr 2008
Location: uk
Age: 23
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote

  #2 (permalink)  
Old May 13th, 2008, 21:40
Junior Member
Join Date: Feb 2008
Location: Michigan
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #3 (permalink)  
Old May 15th, 2008, 11:25
Junior Member
Join Date: Apr 2008
Location: uk
Age: 23
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Re: looking for job quote calculator

client doesnt have sql, would have to be flat file?
Reply With Quote
  #4 (permalink)  
Old May 17th, 2008, 13:29
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,012
Blog Entries: 2
Thanks: 5
Thanked 23 Times in 20 Posts
Send a message via Skype™ to Aso
Re: looking for job quote calculator

Quote:
Originally Posted by bonnit View Post
client doesnt have sql, would have to be flat file?
Errm... didn't awatson provide a solution that does just that!

Quote:
Originally Posted by awatson View Post
I'd set up the data file as a tab-delimited file...
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 06:05.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43