Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP contact form not sending
    text
    copied!<p>I have a contact form on a page that sends the details of the form to an email address. You can view it here, www.wonder.ie</p> <p>The HTML for the form is the following:</p> <pre><code>&lt;form id="form" name="form27" class="wufoo page" enctype="multipart/form-data" method="post" action="mailer.php"&gt; &lt;ul&gt; &lt;li id="foli1"&gt; &lt;label class="op" id="title1" for="Field1"&gt;Name&lt;/label&gt; &lt;div&gt;&lt;input id="Field1" name="name" type="text" class="op required" value="" maxlength="255" tabindex="1" onkeyup="handleInput(this);" onchange="handleInput(this);" /&gt;&lt;/div&gt; &lt;/li&gt; &lt;li id="foli2"&gt; &lt;label class="op" id="title2" for="Field2"&gt;Email&lt;/label&gt; &lt;div&gt;&lt;input id="Field2" name="email" type="text" class="op required email" value="" maxlength="255" tabindex="2" onkeyup="handleInput(this);" onchange="handleInput(this);" /&gt;&lt;/div&gt; &lt;/li&gt; &lt;li id="foli3"&gt; &lt;label class="op" id="title3" for="Field3"&gt;Inquiry&lt;/label&gt; &lt;div&gt;&lt;textarea id="Field3" name="message" class="op required" rows="10" cols="50" tabindex="3" onkeyup="handleInput(this);" onchange="handleInput(this);"&gt;&lt;/textarea&gt;&lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; &lt;input id="button" name="saveForm" class="btTxt submit" type="submit" value="Submit" /&gt; &lt;/form&gt; </code></pre> <p>And for my PHP it is this:</p> <pre><code>&lt;?php if(isset($_POST['submit'])) { $to = "AN_EMAIL@ADDRESS.COM"; $subject = "Email from Wonder.ie"; $name_field = $_POST['name']; $email_field = $_POST['email']; $message = $_POST['message']; $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message"; mail($to, $subject, $body); } else { echo "blarg!"; } ?&gt; </code></pre> <p>Does everything look correct? I know I have the form names matched correctly with the PHP but I can't figure out why I'm not receiving the email you know - FYI the PHP on the site has a real email address, not AN_EMAIL@ADDRESS.COM. Once I hit the submit button I am taken to mailer.php but I notice the echo "blarg!" so my guess is the email is not being sent.</p> <p>Thank you!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload