Jump to content

Form Is Working, But Not Receiving Emails!!!!


DC04

Recommended Posts

I'm new to PHP, and I am curious as to why my form is not 100% working.  When I fill out all the fields and hit submit, I never receive the e-mail address.  I copied the code from another form, but added some fields. Can anyone help?

 

<?
                            if ($_POST["email"]<>'') {
                            $ToEmail = '________________';
                            $EmailSubject = 'Email Received from saveonremodeling.com';
                            $mailheader = "From: ".$_POST["email"]."\r\n";
                            $mailheader .= "Reply-To: ".$_POST["email"]."\r\n";
                            $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
                            $MESSAGE_BODY = "Name: ".$_POST["name"]."<br>";
                            $MESSAGE_BODY = "Address: ".$_POST["address"]."<br>";
                            $MESSAGE_BODY .= "Phone: " .$_POST["phone"]."<br>";
                            $MESSAGE_BODY = "Fax: ".$_POST["fax"]."<br>";
                            $MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>";
                            $MESSAGE_BODY .= "Square Footage To Be Covered: ".$_POST["sfeet"]."<br>";
                            $MESSAGE_BODY .= "Materials To Be Used: ".$_POST["material"]."<br>";
                            $MESSAGE_BODY .= "Projected Installation Date: ".$_POST["date"]."<br>";
                            $MESSAGE_BODY .= "Projected Budget: ".$_POST["budget"]."<br>";
                            $MESSAGE_BODY .= "Comment: ".nl2br($_POST["comment"])."<br>";
                            mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
                            ?>
                            <span style="color:#000; font-weight:bold">Thank You for submitting an email through Discount 		Flooring and Remodeling on-line, someone will respond ASAP.</span>
                            <? } else { ?>
                            <form action="quote.php" method="post">
                            <table width="100%" border="0" cellspacing="2" cellpadding="0">
                            <tr>
                            <td width="29%" class="bodytext">Name:</td>
                            <td width="71%"><input name="name" type="text" id="name" size="32"></td>
                            </tr>
                            <tr>
                            <td width="29%" class="bodytext">Address:</td>
                            <td width="71%"><textarea name="address" cols="29" rows="6" id="address" class="bodytext"></textarea></td>
                            </tr>
                            <tr>
                            <td class="bodytext">Phone:</td>
                            <td><input name="phone" type="text" id="phone" size="32"></td>
                            </tr>
                            <tr>
                            <td class="bodytext">Fax:</td>
                            <td><input name="fax" type="text" id="fax" size="32"></td>
                            </tr>
                            <tr>
                            <td class="bodytext">E-mail Address:</td>
                            <td><input name="email" type="text" id="email" size="32"></td>
                            </tr>
                            <td class="bodytext">Square Footage To Be Covered:</td>
                            <td><input name="sfeet" type="text" id="sfeet" size="32"></td>
                            </tr>
                            <td class="bodytext">Materials To Be Used:</td>
                            <td><input name="material" type="text" id="material" size="32"></td>
                            </tr>
                            <td class="bodytext">Projected Installation Date:</td>
                            <td><input name="date" type="text" id="date" size="32"></td>
                            </tr>
                            <td class="bodytext">Projected Budget (If Any):</td>
                            <td><input name="budget" type="text" id="budget" size="32"></td>
                            </tr>
                            <tr>
                            <td class="bodytext">Comment:</td>
                            <td><textarea name="comment" cols="45" rows="6" id="comment" class="bodytext"></textarea></td>
                            </tr>
                            <tr>
                            <td class="bodytext"> </td>
                            <td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td>
                            </tr>
                            </table>
                            </form>
                            <? }; ?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.