PDA

View Full Version : Bit of help



Hayd93
08-09-2008, 05:42 PM
Right i want to make a form so i can add numbers into a database and this adds then to the total all ready.

so what i want is a form and say i put for 4 in it will add it to what is all ready in the database. I then want it to show me how mutch is in the database.

What i a doing is a fund wich i set money aside and i want to be able to add how mutch mponey i earnt in the day ect into this database then i can keep track on how mutch i have.

+ rep if anyone can do this

Thanks
Hayd93

Excellent2
08-09-2008, 07:50 PM
This is quite easy, you use math in php with the plus sign being * so whatever amount they submit, query the database for the amount already in there then use the mysql_fetch_array function to fetch the info. Display this by using something like:
$array[current] * $amount

Then display the current amount using the same function but not adding the amount submitted, if this makes sense.

Johno
08-09-2008, 08:02 PM
Don't you use a mac? Why don't you use Cha-Ching? :)

I understand its not the same as like something on the web but its really useful - If Cha-Ching wont do then ill +rep whoever does this for you too lol :)

Hayd93
08-09-2008, 09:09 PM
Don't you use a mac? Why don't you use Cha-Ching? :)

I understand its not the same as like something on the web but its really useful - If Cha-Ching wont do then ill +rep whoever does this for you too lol :)
Ye i know about that just would prefeer a web based sort of thing. And anyway with a bit of fiddleing worked out what to do so + rep to both.

Want to hide these adverts? Register an account for free!