lundi 28 septembre 2015

two If statements not working php

I'm trying to put to if statement together in php but only one of them is executed

            if ($actualBalance < $redeemedBalance && $redeemedBalance <500) { // If trying to redeem what the user don't have OPEN ?>
            <span class='greeting'>Sorry, you can't exchange that...</span><br/>
            <span class='heading'>You have <?php echo $row['balance']; ?> Beezes that you can exchange here.</span><br/>
            <span class='heading'>Enter the amount you wish to redeem and hit submit.</span><br/>
            <form class="btcregform" action='redeem.php' method='post'>
                <input class="btcregforminput" type='text' value='' id='vidcoinamount' name='vidcoinamount'>
                <input class="btcregformbutton" type='submit' value='Submit' id='button' name='redeembutton'>
            </form>
            <?php // If trying to redeem what the user don't have CLOSE
            } else { ?> 

my problem is that part

if ($actualBalance < $redeemedBalance && $redeemedBalance < 499)

If the actualbalance is more than the redeemedBalance it works but the part if the redeemedBalnce is less than 500 is not being executed it acts like it's not even there. Please help (newbie here)

Aucun commentaire:

Enregistrer un commentaire