Author Topic: techie cabbie looking for help lol  (Read 250 times)

0 Members and 1 Guest are viewing this topic.

Offline aminsagar123Topic starter

  • Irregular
  • Posts: 2
    • View Profile
techie cabbie looking for help lol
« on: March 16, 2010, 03:59:27 AM »
hi friends,
i need a very simple php script. it can save me a lot of time everyday filling my shift reports.

i drive a hire car and need to fill shift report at the end of the day and do little calculation for that.


i need 3 input boxes namely fare, eftpos, fuel and one output box named as result....

formula is 52% of fare - (fuel+eftpos) = result

so if fare is 200
fuel is $20
eftpos $60

result  52% of 200 - (20+60) = 24



can someone please make me a script for that. i will upload it to my server and use iphone for this calculation everyday. thanks  :P


Offline Rustywolf

  • Enthusiast
  • Posts: 72
    • View Profile
Re: techie cabbie looking for help lol
« Reply #1 on: March 16, 2010, 04:30:08 AM »
<?php


$fare 
$_GET['fare'];
$fuel $_GET['fuel'];
$eftpos $_GET['eftpos'];

$mult1 $fuel $eftpos;
$mult2 $fare $mult1;
$mult3 $mult2 .52;

echo 
$mult3;

?>



Should work?

Offline aminsagar123Topic starter

  • Irregular
  • Posts: 2
    • View Profile
Re: techie cabbie looking for help lol
« Reply #2 on: March 16, 2010, 05:31:02 AM »
thanks man. really appreciate your help.  8)