Note that there are some explanatory texts on larger screens.

plurals
  1. POphp mail form code not working
    primarykey
    data
    text
    <p>I have a basic email form that I can not get to work, it's been taken from a tutorial online and for some reason I can not get this to send an email to the email address. The email form registers that all the fields are correctly fields out and displays the sent text but the email never seems to come through:</p> <pre><code> &lt;?php function spamcheck($field) { $field=filter_var($field, FILTER_SANITIZE_EMAIL); if(filter_var($field, FILTER_VALIDATE_EMAIL)) { return TRUE; } else { return FALSE; } } if (isset($_REQUEST['email'])) { $mailcheck = spamcheck($_REQUEST['email']); if ($mailcheck==FALSE) { echo "Invalid input"; } else{ $fullname = $_REQUEST['fullname'] ; $email = $_REQUEST['email'] ; $link = $_REQUEST['link'] ; mail("myemail@me.co.uk", "Track link from: " .$fullname, $link, "From:" . $email); echo "Thank you for using our mail form"; } } else { echo'&lt;div id="formcontainer"&gt; &lt;form method="post" action="contact.php"&gt; &lt;div id="form"&gt; &lt;div class="row"&gt; &lt;div class="label"&gt;Your name&lt;/div&gt;&lt;!--end .label --&gt; &lt;div class="input"&gt; &lt;input type="text" id="fullname" class="detail" name="fullname" value="" /&gt; &lt;/div&gt;&lt;!--end .input --&gt; &lt;div class="context"&gt;e.g Derek Datch&lt;/div&gt;&lt;!-- end .context --&gt; &lt;/div&gt;&lt;!-- end .row --&gt; &lt;div class="row"&gt; &lt;div class="label"&gt;Your email&lt;/div&gt;&lt;!--end .label --&gt; &lt;div class="input"&gt; &lt;input type="text" id="email" class="detail" name="email" value="" /&gt; &lt;/div&gt;&lt;!--end .input --&gt; &lt;div class="context"&gt;We will not share your email with anyone.&lt;/div&gt;&lt;!-- end .context --&gt; &lt;/div&gt;&lt;!-- end .row --&gt; &lt;div class="row"&gt; &lt;div class="label"&gt;Link to track&lt;/div&gt;&lt;!--end .label --&gt; &lt;div class="input"&gt; &lt;input type="text" id="link" class="detail" name="link" value="" /&gt; &lt;/div&gt;&lt;!--end .input --&gt; &lt;div class="context"&gt;e.g a link from Sound Cloud, Dropbox or any other files sharing website.&lt;/div&gt;&lt;!-- end .context --&gt; &lt;/div&gt;&lt;!-- end .row --&gt; &lt;div id="sumbit"&gt; &lt;input type="submit" id="submit" name="submit" value="Send link" /&gt; &lt;/div&gt;&lt;!-- end #sumbit --&gt; &lt;/div&gt;&lt;!-- end #form --&gt; &lt;/form&gt; &lt;/div&gt;&lt;!-- end #formcontainer --&gt;'; } ?&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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