Jump to content


Photo

Math in php


  • Please log in to reply
4 replies to this topic

#1 Eiolon

Eiolon
  • Members
  • PipPipPip
  • Advanced Member
  • 357 posts

Posted 12 August 2006 - 12:55 AM

I am looking for any resources that would help me with mathematics in PHP.  Be it a good book, website or anything.

Here is what I have to accomplish:

Purchase Database

Index page displays: Account Code, Account Name, Budget and Amount Remaining

Every time somone adds a purchase it will subtract from the budget in that account and display the remaining amount of monies in that account.

Many thanks for your assistance!

#2 raza.shahzad

raza.shahzad
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 12 August 2006 - 01:22 AM

dear friend,

Here is what I have to accomplish:

Purchase Database

Index page displays: Account Code, Account Name, Budget and Amount Remaining

i suppose that the above quoted statements refer to the project you are handling and the problem you are facing is as under:

Every time somone adds a purchase it will subtract from the budget in that account and display the remaining amount of monies in that account.

this is simple. suppose that $cost is the cost of item purchased and $budget is the amount the visitor has. $remainingamount being the.... oh u can understand.
then
$remainingamount = $budget - $cost;
simple
:)
if you want to ask for the process that you have to apply to your database then you can ask. otherwise your present question has been answered. i hope....

#3 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 12 August 2006 - 01:24 AM

See here:

http://www.php.net/math

and here:

http://us3.php.net/m....arithmetic.php

#4 raza.shahzad

raza.shahzad
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 12 August 2006 - 02:02 AM

friend,
i hope your problem has been solved. yet if you encounter any problem you can reply to this msg of mine. thankyou.
one more thing. your subject said that you were looking for a maths problem and being a mathematics student i took it wrong and thought if you were looking for something related to algebra, geometry or calculus etc.
anyways, keep working good on your project.

#5 Eiolon

Eiolon
  • Members
  • PipPipPip
  • Advanced Member
  • 357 posts

Posted 12 August 2006 - 02:56 AM

friend,
i hope your problem has been solved. yet if you encounter any problem you can reply to this msg of mine. thankyou.
one more thing. your subject said that you were looking for a maths problem and being a mathematics student i took it wrong and thought if you were looking for something related to algebra, geometry or calculus etc.
anyways, keep working good on your project.


I haven't been able to try it out because everything is at work.  I didn't expect to get answers so soon so I thought I'd post it tonight and come back to it tomorrow.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users