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