Skip to content Skip to sidebar Skip to footer

Html - Php Contact Form Email

I have searched here and in google how to make a contact form to work and I havent been able. I downloaded a 'php contact form' but I dont know how to make it work. I know there h

Solution 1:

Here "Here is the message:\n $message". <= see the dot? That's supposed to be a semi-colon.

That, is the reason why OP's code is not working.

Add error reporting to the top of your file(s) which will help find errors, which it would have.

<?php 
error_reporting(E_ALL);
ini_set('display_errors', 1);

// rest of your code

Sidenote: Error reporting should only be done in staging, and never production.

Solution 2:

everything looks correct, just add exit after redirect.

header('Location: thank-you.html');
exit;

Post a Comment for "Html - Php Contact Form Email"