Hi
When I run my contact email form it returns the message "Error!"
The code was ripped rom another post so appologies to the original writer!
I do not know why? Can anyone help!
Code for Form is:
<form id="form1" action="mail.php" method="POST">
<label>Name
<span class="small">Add your name</span>
</label>
<input type="text" name="name">
<label>Email
<span class="small">Enter a Valid Email</span>
</label>
<input type="text" name="email">
<br />
<br />
<br />
<br />
<label>Message
<span class="small">Type Your Message</span>
</label>
<textarea name="message" rows="6" cols="25"></textarea><br />
<button type="submit" value="Send" style="margin-top:15px;">Submit</button>
<div class="spacer"></div>
</form>
php code is:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$call = $_POST['call'];
$website = $_POST['website'];
$priority = $_POST['priority'];
$type = $_POST['type'];
$message = $_POST['message'];
$formcontent=" From: $name \n Phone: $phone \n Call Back: $call \n Website: $website \n Priority: $priority \n Type: $type \n Message: $message";
$recipient = "philo694@softairtest.x10.mx";
$subject = "Contact Form";
$mailheader = "From: philo694@softairtest.x10.mx\r\n";
echo "recipient: $recipient <br />";
echo "subject: $subject <br />";
echo "formcontent: $formcontent <br />";
echo "mailheader: $mailheader <br />";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You for contacting me!" . " -" . "<a href='contact.html' style='text-decoration:none;color:#ff0099;'> Return Home</a>";
?>
Thanks in advance
When I run my contact email form it returns the message "Error!"
The code was ripped rom another post so appologies to the original writer!
I do not know why? Can anyone help!
Code for Form is:
<form id="form1" action="mail.php" method="POST">
<label>Name
<span class="small">Add your name</span>
</label>
<input type="text" name="name">
<label>Email
<span class="small">Enter a Valid Email</span>
</label>
<input type="text" name="email">
<br />
<br />
<br />
<br />
<label>Message
<span class="small">Type Your Message</span>
</label>
<textarea name="message" rows="6" cols="25"></textarea><br />
<button type="submit" value="Send" style="margin-top:15px;">Submit</button>
<div class="spacer"></div>
</form>
php code is:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$call = $_POST['call'];
$website = $_POST['website'];
$priority = $_POST['priority'];
$type = $_POST['type'];
$message = $_POST['message'];
$formcontent=" From: $name \n Phone: $phone \n Call Back: $call \n Website: $website \n Priority: $priority \n Type: $type \n Message: $message";
$recipient = "philo694@softairtest.x10.mx";
$subject = "Contact Form";
$mailheader = "From: philo694@softairtest.x10.mx\r\n";
echo "recipient: $recipient <br />";
echo "subject: $subject <br />";
echo "formcontent: $formcontent <br />";
echo "mailheader: $mailheader <br />";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You for contacting me!" . " -" . "<a href='contact.html' style='text-decoration:none;color:#ff0099;'> Return Home</a>";
?>
Thanks in advance