max leave = 18(fixed) duration = depend i want count the balance of leave.. balance = max leave - duration.
can u write a code for this formula in php.. thank you
Using your ideas:
max leave = 18(fixed) duration = depend i want count the balance of leave.. balance = max leave - duration. [/QOUTE] $balance = $duration - 18; You would have to write an SQL statement to get your duration variable, unless you are passing it via a $GET method through the URL. Then it would gomething like: $balance = $_GET['duration'] - 18; This is kind of simplistic, but it doesn't appear that you are looking for anything more complex than this...
max leave = 18(fixed) duration = depend i want count the balance of leave.. balance = max leave - duration. [/QOUTE]
$balance = $duration - 18;
You would have to write an SQL statement to get your duration variable, unless you are passing it via a $GET method through the URL. Then it would gomething like:
$balance = $_GET['duration'] - 18;
This is kind of simplistic, but it doesn't appear that you are looking for anything more complex than this...
wat is mean by [QOUTE] [/QOUTE] and is it need to write a replace code for '$_GET ?
thanks a lot.