Below you will see a .php mail form code. When I use a submit button in the contact.html, it all works fine. But when I use an image to submit, it doesn't work. It seems like something isn't correct in the .php.
Can anyone adapt and make the script better, please ?
Code:<?
if ($_POST["Submit"]){
if ($_POST["name"] and $_POST["email"] and $_POST["message"] ){
mail (
"info@casariegoart.com",
"via website (EN)",
"
Name: ".$_POST['name']."
E-mail: ".$_POST['email']."
Message: ".$_POST['message']."
",
"From: ".$_POST['name']." <".$_POST['email'].">");
echo '<p align="center"><font color="#003366">Thanks !<br>Your message has been sent.<br> We will get back to you as soon as we can.</font></p>';
}
else{
echo '<p align="center"><font color="#FF0000">Please fill in all data!<br>All fields are obligatory.</font></p><p><a href="contactEN.html">[back]</a>';
}
}
?>
