RP1America
Technical User
I have a simple contact form that I cannot seem to get to send me an email. Any suggestions?
Thanks!
Thanks!
Code:
<!-- Begin Form -->
<div id="formsize">
<form method="post" action="sendmail.php">
<fieldset>
<legend>Contact Form</legend>
<img width="160" src="../images/contactus.gif" alt="Contact Form" height="160" id="formimage" /> <br />
<label>Your Name:</label><br />
<input name="name" id="name" /><br />
<label>Your Email:</label><br />
<input name="email" id="email" /><br />
<label>Phone Number:</label><br />
<input name="phone" id="phone" /><br /><br />
<label>Your Message:</label><br />
<textarea cols="40" rows="10" name="message" id="message"></textarea><br /><br />
<input value="Submit" type="submit" />
</fieldset>
</form>
</div>
<!-- End Form -->
Code:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$to = 'info@abcsolutions.com';
$subject = "Contact Us Form from $name";
$comments = "Name: $name\nEmail: $email\nPhone: $phone\n\nMessage: $message";
$headers = "From: $email";
mail($to, $subject, $comments, $headers);
header( "Location: thankyou.html" );
?>