PHP type calculator????

Status
Not open for further replies.

jerxs

New member
Jun 24, 2006
1,804
24
0
North East PA
I started contracting CATV, VOIP installations and am getting paid by the job, or better yet by action per job. So if in one job I run a new line from a pole to a home that is $XX amount, a new line from the house into the house is $XX amount, installing the modem or whatever is $xx amount.... So by the end of the day I may have run like 7 lines from pole to house, 15 inlines, 10 dig, phone or modem installs and so on....

What Id like to do is develop a calculator, that I can plug all of the work that I did for that day into and have it spit out exactly how much I made. To get a better idea of what I would like to do see ---> hxxp://lendsense.com/getpaid/

I am not looking for anyone to build it for me, I have been trying to learn php for awhile now and was hoping that one of you gurus could give me a run down, a generalization of what I need to do, what I need to learn and hopefully answer some questions I might have along the way.

Id like to do it openly in this thread, so that maybe some other poor sap trying to learn PHP will benefit from it. Theres just to much to php, Ive spent hours here PHP: Hypertext Preprocessor , and theres just way to much info, I get lost and dont know where to start. I got HTML,XHTML,CSS, though PHP is a different animal all together.

Anyway, if your not in a giving mood, Ill shoot you a few bucks to give me a hand, not to develop this thing, but to walk me through it openly on the board.

Jer
 


Ok, presuming you want to do it in php, and don't want to muck with a database, here's a suggestion...I'm purposefully being vague but this'll get you started.

First, make a form .. blah blah .. this can be in html if you want.
Code:
<form method=post action=nextstep.php>
<input type=text name='hours' value='' size=5 maxlength=4>
<select name="worktype">
<option value='25'>digging a ditch</option>
<option value='35'>swinging cable like a monkey</option>
</select>
<input type=submit>
</form>

Your page either submits to itself or to the page named in "action=''" in the form tag. On that page take this value:
$_GET['worktype']
and this value
*_GET['hours']

make sure they're numbers and multiply them.
Echo this value ( echo "you earned $x by doing something!<br />" ).

You can figure out how to repeat the number of rows, include a description, et cetera.
 
On review of your question, I think I did the wrong labels, but your form and math would be the same, you just have different labels ( not $$ per hour for digging a ditch but number of times you installed a modem ).
 
Maybe you want to learn PHP or maybe you have thoughts about monetizing the app .. dunno ... but sounds simple enough for a spreadsheet and if you need that spreadsheet to be available via HTTP just do it on docs.google.com. If you still want to do PHP I'll help you along ... PM me.
 
Id like to do it in PHP, the calculator will serve two purposes, one make billing and figuring out monies earned at the end of each day easier and two to start learning a little more php. Id like to actually build something in PHP that works.

I am going to sit and work on it a bit tonight.

If for some reason I cant get it ill be posting this project in buy sell and trade section and then just pay someone to do it for me, but Id really like to get er done myself.
 
Status
Not open for further replies.