title: PHP form not working showing blank page
body: <p>My form having Name, Email, Phone &amp; Message field is not working. When I am submitting the form, blank page is opening with the php mail handler url. It should be showing the thank you message instead. Also no email is received at the email  ID. Please help.</p>
  
  <p><strong>My HTML form code is</strong> </p>
  
  <pre><code>&lt;form id="contactform" action="contact_form.php" method="POST"&gt;
            &lt;div&gt;
              &lt;input type="text" class="form-control" placeholder="Name" name="name" required id="name"&gt;
            &lt;/div&gt;
            &lt;div&gt;
              &lt;input type="email" class="form-control" placeholder="Email" name="email" required id="email"&gt;
            &lt;/div&gt;
            &lt;div&gt;
              &lt;input type="text" class="form-control" placeholder="Phone" required name="phone" id="phone"&gt;
            &lt;/div&gt;
              &lt;textarea class="form-control" name="message" id="message" rows="4" placeholder="Enter Your Message" required&gt;&lt;/textarea&gt;
  
            &lt;div class="text-center"&gt;
            &lt;button type="submit" value="submit" class="btn btn-default"&gt;SUBMIT&lt;/button&gt;
            &lt;/div&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p><strong>PHP CODE FOR MAIL</strong> </p>
  
  <pre><code>&lt;?php 
  if(isset($_POST['submit'])){
      $to = "xyz@abc.com"; // this is your Email address
      $from = $_POST['email']; // this is the sender's Email address
      $name = $_POST['name'];
      $phone = $_POST['phone'];
      $subject = "Form submission";
      $subject2 = "Copy of your form submission";
      $message = "Name:". $name . "\n" . "Phone:" . $phone . "\n" . "\n" . "Message:" . "\n" . $_POST['message'];
      $message2 = "Here is a copy of your message " . "\n" . "Name:" . $name . "\n" . "Phone:" . $phone . "\n" . "\n" . "Message:" . "\n" . $_POST['message'];
      $headers = "From:" . $from;
      $headers2 = "From:" . $to;
      mail($to,$subject,$message,$headers);
      mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender
      echo "Mail Sent. Thank you, " . $name . ", we will contact you shortly.";
      // You can also use header('Location: thank_you.php'); to redirect to another page.
      // You cannot use header and echo together. It's one or the other.
      }
  ?&gt;
  </code></pre>
  
  <p>The form is on the bottom of this page
  <a href="https://www.delveindia.com/products/billing-software/" rel="nofollow">https://www.delveindia.com/products/billing-software/</a></p>