Page 1 of 1

Simple calculation standalone app

Posted: Fri Nov 05, 2004 10:47 am
by abhic
Hey guys,
I just ran into your forum site and would like to post a request. Don't know if Iwill get flamed or not for this. But I work in a small business and need to do these calculations on a very regular basis. Right now I am doing this manually, but I would like to get this automated and get a tiny app for this. If anybody would like to help, that would be deeply appreciated.

Thank you.

n= user input

if (n<=300)
i=((30*n)/100)

if (n>300&&n<=1000)
r=n-300
i=((30*n)/100)
i=i+((25*r)/100)

if (n>1000)
r=n-300
s=n-700
i=((30*n)/100)
i=i+((25*r)/100)
i=i+((20*s)/100)

print i

Posted: Fri Nov 05, 2004 11:03 am
by AVATAr
did you do some research??
you need to do a form for the user input
fetch that number from the $_POST array
and then do the math.. and echo the result.

Posted: Fri Nov 05, 2004 12:14 pm
by timvw
you can buy it for € 20 :p

test live at http://timvw.madoka.be/stuff/calculator.php

Posted: Fri Nov 05, 2004 2:02 pm
by kettle_drum
lol. Go tim!!