title: Bootstrap and PHP contact form display blank page when clicking submit
body: <p>Hii guys I need some help.</p>
  
  <p>When I try and test my bootstrap form, it displays a white screen. Here's my code.NB Am newbie to web developing, #ExcuseMyFrenchThough</p>
  
  <p>Here is my index.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;div class="container"&gt;
  &lt;div class="row"&gt;
        &lt;div class="col-md-6 col-md-offset-3" id="offer"&gt;
  
              &lt;h2 id="form"&gt; LET'S WORK ? &lt;/h2&gt;
  
              &lt;/div&gt;
  
              &lt;div class="col-md-6 col-md-offset-3"&gt;
  
              &lt;form role="form" method="post" action="contact.php"&gt;
  
  
              &lt;div class="form-group"&gt;
                &lt;input type="text" class="form-control" placeholder="Enter Your Name"&gt;
                  &lt;?php echo "&lt;p class='text-danger'&gt;$errName&lt;/p&gt;";?&gt;
                &lt;/div&gt;
  
                &lt;div class="form-group"&gt;
  
                 &lt;input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter Your Email"&gt;
                 &lt;?php echo "&lt;p class='text-danger'&gt;$errEmail&lt;/p&gt;";?&gt;
                &lt;/div&gt;
  
                &lt;div class="form-group"&gt;
                &lt;textarea class="form-control" id="textarea1" rows="3" placeholder="Enter Your Message here"&gt; &lt;/textarea&gt;
                &lt;?php echo "&lt;p class='text-danger'&gt;$errMessage&lt;/p&gt;";?&gt;
  
                &lt;/div&gt;
  
                &lt;div class="form-group"&gt;
                &lt;button type="submit" class="default-submit btn btn-large propClone bg-fast-pink btn-circle font-weight-300 text-white tz-text"&gt;SEND MESSAGE&lt;/button&gt;
                &lt;/div&gt;
  
                &lt;div class="form-group"&gt;
                      &lt;div class="col-sm-10 col-sm-offset-2"&gt;
                        &lt;?php echo $result; ?&gt;  
                     &lt;/div&gt;
    &lt;/div&gt;
              &lt;/form&gt;
              &lt;/div&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>PHP CODE [CONTACT.PHP]</p>
  
  <pre><code>&lt;?php
      if (isset($_POST["submit"])) {
          $name = $_POST['name'];
          $email = $_POST['email'];
          $message = $_POST['message'];
          /*$human = intval($_POST['human']); */
          $from = 'Geofrey Zellah'; 
          $to = 'hotbonge@gmail.com'; 
          $subject = 'Message from Geofrey Zellah ';
  
          $body = "From: $name\n E-Mail: $email\n Message:\n $message";
  
          // Check if name has been entered
          if (!$_POST['name']) {
              $errName = 'Please enter your name';
          }
  
          // Check if email has been entered and is valid
          if (!$_POST['email'] || !filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
              $errEmail = 'Please enter a valid email address';
          }
  
          //Check if message has been entered
          if (!$_POST['message']) {
              $errMessage = 'Please enter your message';
          }
  
          /*
          //Check if simple anti-bot test is correct
          if ($human !== 5) {
              $errHuman = 'Your anti-spam is incorrect';
          } */
  
  // If there are no errors, send the email
  if (!$errName &amp;&amp; !$errEmail &amp;&amp; !$errMessage /*&amp;&amp; !$errHuman*/) {
      if (mail ($to, $subject, $body, $from)) {
          $result='&lt;div class="alert alert-success"&gt;Thank You! I will be in touch&lt;/div&gt;';
      } else {
          $result='&lt;div class="alert alert-danger"&gt;Sorry there was an error sending your message. Please try again later&lt;/div&gt;';
      }
  }
      }
  ?&gt;
  </code></pre>
  
  <p>Screenshot of what I get after I click submit on my page, NB live not local<br>
  <a href="https://i.stack.imgur.com/bVBTy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bVBTy.png" alt="enter image description here"></a></p>
  
  <p>anyone ?</p>