Error msgs showing before it should
Posted: Wed Nov 11, 2009 9:45 am
Hey everyone I have a page where they must enter an amount no larger then their acct balance. Well I have the code to prevent it from being smaller then the amount allowed to be entered. Now the code that I have to prevent it from being larger then acct balance is what I need help with.
Here is my code for the error msg
$_POST['amount'] is the box they enter numbers in
$cashbal is the available balance
if someone can help me out I just cant fiqure it out. I have tried both < and > signs and still same thing.
Thanks
Don
Here is my code for the error msg
$_POST['amount'] is the box they enter numbers in
$cashbal is the available balance
Code: Select all
if ($_POST['amount'] <= $cashbal) {
} else {
$error=TRUE;
$msg .= '<li>Not enough funds <a href="transfer.php">try again</a></li>';
}if someone can help me out I just cant fiqure it out. I have tried both < and > signs and still same thing.
Thanks
Don