I'm trying to combine 3 if statements into one.
I can get two of them working but not when i add the third.
The three statements are (without the unneeded stuff):
if(isset($_POST['Submit'])) {
}
if($_POST['amount'] == '') {
}
if($_POST['amount'] == '0') {
}
The two i can get working
if((isset($_POST['Submit'])) && ($_POST['amount'] != '')) {
And when i try all three together, its acts as though the submit button has been pressed when it hasn't. I suspects its something to do with my brackets but not sure
if(((isset($_POST['Submit'])) && (($_POST['amount'] != '')) || ($_POST['amount'] != '0'))) {
What i'm trying to do is:
If the submit button has been pressed and amount doesn't equal 0 or has been left empty, submit the form, else do nothing