First you need to alter you else if statements, you write :

    If $session_ValueA >$100 and < $499 set $session_fee=$20

I would write :

    if(($session_ValueA >=100) and ($session_ValueA <=499)){

And as you see, you cant evaluate >$20 since PHP doesnt know
that $20 is 20 dollars. It assumes its a variable with name of 20.
The $ (dollarsign), in your case, is just for show. Same goes for the
fee. You will need to work with the numbers only, knowing their
currency, then when you print it out you can typically  :

echo '$' . $session_fee;

Have another go!

Kim Steinhaug
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.

"Aleks Kalynovych" <[EMAIL PROTECTED]> wrote in message
Hi all,

I am trying to figure out a way to calculate a value based on another value
and then set that value in a session variable.

So, if $session_ValueA <= $100 set $session_fee = $10
If $session_ValueA >$100 and < $499 set $session_fee=$20
If $session_VAlueA >$499 and <$999 set $session_fee=$50

Or something like this., I have to evaluate $session_ValueA to 6 possible

Once this is done, I also would like to be able to calculate a % of
As commission. I tried to use If, Else but can't seem to get it right..

Any suggestions?? Thanks

Aleks =

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to