Rewritten if statement for form submit button & notification

Old if statement was incompatible with latest PHP and EE