Your if statement is checking to see if the mail function is true, it's not performing the mail function.
You want to say, if 'somethings true', then send the email and print 'thankyou for your enquiry' - else, print 'an unknown error has occured'...
if (somethings true) {
mail('EMAIL ADDRESS','Form feedback','Message here', 'From: email.com');
print("<p>Thank you for your enquiry, please go back</p>");
}else{
print("<p>An unknown error has occured, please go back</p>");
}
Just post again if you have more questions
Cheers,
Jim.