Note that there are some explanatory texts on larger screens.

plurals
  1. POSend Confirmation email to the USer Who Filled a Form
    primarykey
    data
    text
    <p>This is My HTML Form</p> <pre><code> &lt;form method="post" name="myemailform" action="form-to-email.php"&gt; &lt;p&gt; &lt;label for='name'&gt;Enter Name: &lt;/label&gt;&lt;br&gt; &lt;input type="text" name="name"&gt; &lt;/p&gt; &lt;p&gt; &lt;label for='email'&gt;Enter Email Address:&lt;/label&gt;&lt;br&gt; &lt;input type="text" name="email"&gt; &lt;/p&gt; &lt;p&gt; &lt;label for='message'&gt;Enter Message:&lt;/label&gt; &lt;br&gt; &lt;textarea name="message"&gt;&lt;/textarea&gt; &lt;/p&gt; &lt;input type="submit" name='submit' value="submit"&gt; &lt;/form&gt; </code></pre> <p>And this is PHP Mailing code which Grabs the data when user clicks submit</p> <pre><code>&lt;?php if(!isset($_POST['submit'])) { echo "error; you need to submit the form!"; } $name = $_POST['name']; $visitor_email = $_POST['email']; $message = $_POST['message']; //Validate first if(empty($name)||empty($visitor_email)) { echo "Name and email are mandatory!"; exit; } $email_from = 'tom@amazing-designs.com';//&lt;== update the email address $email_subject = "New Form submission"; $email_body = "You have received a new message from the user $name.\n". "Here is the message:\n $message". $to = "khan.koder@gmail.com";//&lt;== update the email address $headers = "From: $email_from \r\n"; $headers .= "Reply-To: $visitor_email \r\n"; mail($to,$email_subject,$email_body,$headers); //done. redirect to thank-you page. header('Location: thank-you.html'); ?&gt; </code></pre> <p>It shows no error but just land on the page thank-you.html I checked my email account but no mail recieved </p> <p>Please help whats wrong</p>
    singulars
    1. This table or related slice is empty.
    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