Hey everyone,
I have a really simple php contact form that I managed to mess up and can't for the life of me figure out what the problem is. It accepts the responses and will continue to the "success" page like it's supposed to, but it doesn't mail the data from the form fields when it does. I was hoping you'd be able to take a look and maybe find the error(s)... I know it's probably something really simple and stupid but I can't figure it out.
Thanks in advance!!
<?php
//-----------------------------------------------------
//-----------------------------------------------------
$address= "
[email protected]";
//-----------------------------------------------------
//-----------------------------------------------------
$firstname = $_REQUEST["First Name: "];
$lastname = $_REQUEST["Last Name: "];
$phone = $_REQUEST["Phone Number: "];
$referred = $_REQUEST["I was referred by: "];
$address = $_REQUEST["Address: "];
$city = $_REQUEST["City: "];
$province = $_REQUEST["Province: "];
$postal = $_REQUEST["Postal Code: "];
$email = $_REQUEST["Email Address: "];
$mime_boundary = md5(time());
$headers = "From: $name <$email>\n";
$headers .= "Reply-To: $subject <$email>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n";
$message = "--$mime_boundary\n\n";
$message .= "New Web Registration: \n\n\n";
$message .= "First Name: $firstname \n\n";
$message .= "Last Name: $lastname \n\n";
$message .= "Phone Number: $phone \n\n";
$message .= "I was referred by: $referred \n\n";
$message .= "Address: $address \n\n";
$message .= "City: $city \n\n";
$message .= "Province: $province \n\n";
$message .= "Postal Code: $postal \n\n";
$message .= "Email Address: $email \n\n";
$message .= "--$mime_boundary--\n\n";
$mail_sent = mail($address, $subject, $message, $headers);
header("location:paypal.html");
?>
?>
<form action="get_mail.php" method="POST" class="contactform">
<p>First Name
<input name="firstname" type="text" / class="box" value="" size="35">
Last Name <input name="lastname" type="text" class="box" value="" size="40"/>
<br>
Phone
<input name="phonenumber" type="text" value="" class="box">
I was referred by <input name="referred" type="text" class="box" value="" size="45">
<br>
Address <input name="address" type="text" class="box" value="" size="35">
City <input name="city" type="text" class="box" value="" size="20">
Province <input name="province" type="text" class="box" value="" size="7">
Postal Code <input name="postal" type="text" class="box" value="" size="6">
Email Address <input name="email" type="text" class="box" value="" size="40">
<br>
<br>
Automatic month-to-month: This is a month-to-month program and is considered active and ongoing until cancelled as described in the Cancellation policy. CANCELLATION POLICY: ShapeIt! member must give notice of cancellation by Email to
[email protected] at least 5 business days from the above stated debit date. Even if you notify your instructor, you still are required to send and email to <a href="mailto:
[email protected]">
[email protected]</a> Save a record of this email to serve as your cancellation receipt. 30-day money back guarantee is contingent upon receiving an email of cancelation to
[email protected] within the first 30 days of signing this agreement.</p>
<p><br>
I certify that I have fully read and understand the terms of this Agreement and will comply with the contents herein. Prepay memberships are non-refundable after the 30 day money back guarantee period expires. <br>
<br>
<input type="submit" class="contactform" value="Proceed to Payment" target="_blank">
<br class="clear" />
</p>
</form>