0) { forwardToDonationPage($amount); } else { $amount = (float)($_POST["amount"]); if(is_numeric($amount) && $amount > 0) { forwardToDonationPage($amount); } else { echo "invalid amount!"; } }