if(isset($_POST['submit']) && $_POST['name'] !== '' && $_POST['email'] !== '' && $_POST['question'] !== ''){ $name = $_POST['name']; $email = $_POST['email']; $question = $_POST['question']; $subject = "my test email contact form"; $body = "From : ".$name."\n"; $body .= $question; $header = "From: $email\nReply-To: $email\nReturn-Path: $email\n"; //IF YOU DONT RECIEVE ANY EMAIL THEN REMOVE THE ABOVE $header CPDE AND UNQUOTE THE BELOW ONE #$header = "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n"; $to = "frizzell.j@gmail.com"; mail($to, $subject, $body, $header);//SEND THE EMAIL header('Location: contact.php?e=sent'); }else if(isset($_POST['name']) && $_POST['name'] == '' || isset($_POST['email']) && $_POST['email'] == '' || isset($_POST['question']) && $_POST['question'] == ''){ header('Location: contact.php?e=fail'); } if(isset($_GET['e']) && $_GET['e'] == 'sent'){ echo "
E-mail has been successfully sent
\n"; }else if(isset($_GET['e']) && $_GET['e'] == 'fail'){ echo "An error occured while sending e-mail. Please make sure that none of the fields were left empty.
\n"; } ?>![]() |
![]() |
|||
![]() ![]() ![]() |
|
|||
|Jewelry|Photography|Art|Textiles|Commissions|Contact| Jessika Frizzell email: frizzell.j@takoink.com |
||||