What is wrong with my php form?
I have this php form on my website that doesn't deliver mails to my email address. I've tried using the exact path and file name only within the form tag to no avail. The form seems to work and even redirects to the desired page after processing, but I get no mail. Can you guys help me? Here the form and php file:
Form:
<form id="contact-form" name="contact-form" method="post" action="http://winwinarticles.com/pages/form-processing.php">
<p>
<label>Name:<br />
<input name="Name" type="text" id="FName" size="30" />
</label>
</p>
<p>
<label>Email:<br />
<input name="Email" type="text" id="Email" size="48" />
</label>
</p>
<p>
<label>Paypal transaction ID:<br />
<input name="Paypal" type="text" id="Paypal" size="48" />
</label>
</p>
<p>
<label>Subject:<br />
<input name="Subject" type="text" id="Subject" size="48" />
</label>
</p>
<p>
<label>Keywords list:<br />
<textarea name="Keyword" id="Keyword" cols="50" rows="7"></textarea>
</label>
</p>
<p>
<label>Title list:<br />
<textarea name="Title" id="Title" cols="50" rows="7"></textarea>
</label>
</p>
<p>
<label>Comments/Questions:<br />
<textarea name="Comment" id="Comment" cols="50" rows="7"></textarea>
</label>
</p>
<p>
<label>
<input name="button" type="submit" class="submit-button" id="button" value="Send" />
</label>
</p>
</form>
Php file:
<?php
while (list($key, $val) = @each($_GET)) $GLOBALS[$key] = $val;
while (list($key, $val) = @each($_POST)) $GLOBALS[$key] = $val;
while (list($key, $val) = @each($_COOKIE)) $GLOBALS[$key] = $val;
while (list($key, $val) = @each($_FILES)) $GLOBALS[$key] = $val;
while (list($key, $val) = @each($_SESSION)) $GLOBALS[$key] = $val;
/* Subject and Email Variables */
$emailSubject = 'Order';
$webMaster = 'myemail@hotmail.com';
/* Gathering Data Variables */
$nameField = $_POST['Name'];
$emailField = $_POST['Email'];
$paypalField = $_POST['Paypal'];
$subjectField = $_POST['Subject'];
$keywordField = $_POST['Keyword'];
$titleField = $_POST['Title'];
$commentField = $_POST['Comment'];
$body = <<<EOD
<br><hr><br>
Name: $nameField <br>
Email: $emailField <br>
Paypal transaction ID: $paypalField <br>
Subject: $subjectField<br>
Keywords list: $keywordField<br>
Title list: $titleField<br>
Comments/Questions: $commentField<br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results Rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<meta HTTP-EQUIV="REFRESH" content="0; url=http://winwinarticles.com/pages/complete.html">
<style type="text/css">
<!--
body {
background-color: #fffff;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #000000;
text-decoration: none;
}
-->
</style>
</head>
<div align="left">
Redirecting you...</div>
</body>
</html>
EOD;
echo "$theResults";
?>
Thank you
-
dad2four -
Thanks - 1 reply
SignatureDONT LOOK{{ DiscussionBoard.errors[8695446].message }}-
PLR Basket -
Thanks - 2 replies
{{ DiscussionBoard.errors[8697942].message }}-
dad2four -
Thanks
SignatureDONT LOOK{{ DiscussionBoard.errors[8698204].message }} -
-
dad2four -
Thanks
SignatureDONT LOOK{{ DiscussionBoard.errors[8698222].message }} -
-
-
-
alistair -
Thanks - 1 reply
{{ DiscussionBoard.errors[8698240].message }}-
PLR Basket -
Thanks - 1 reply
{{ DiscussionBoard.errors[8698292].message }}-
dad2four -
Thanks
SignatureDONT LOOK{{ DiscussionBoard.errors[8698342].message }} -
-
-