aminsagar123 Posted March 16, 2010 Share Posted March 16, 2010 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. thx Link to comment https://forums.phpfreaks.com/topic/195406-techie-cabbie-looking-for-help-lolz/ Share on other sites More sharing options...
Rustywolf Posted March 16, 2010 Share Posted March 16, 2010 <?php $fare = $_GET['fare']; $fuel = $_GET['fuel']; $eftpos = $_GET['eftpos']; $mult1 = $fuel + $eftpos; $mult2 = $fare - $mult1; $mult3 = $mult2 * .52; echo $mult3; ?> Should work? Link to comment https://forums.phpfreaks.com/topic/195406-techie-cabbie-looking-for-help-lolz/#findComment-1026855 Share on other sites More sharing options...
aminsagar123 Posted March 16, 2010 Author Share Posted March 16, 2010 thanks man. really appreciate your help. Link to comment https://forums.phpfreaks.com/topic/195406-techie-cabbie-looking-for-help-lolz/#findComment-1026863 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.