title: php after scrolling to bottom of the page, message in a div is not being executed
body: <p>I have a contact form in PHP. After a mail has been sent I wanted the functionality of scroll to the bottom of the page so that user can see whether mail has been sent or not. If a mail has been sent/failed to send we get a error message using an alert class for div. However here the after the page scrolls to the bottom I'm unable to see the alert box but if I remove the scroll to bottom functionality i'm able to see the alert message even after the mail has been sent. Can anyone guide me on where i'm wrong.</p>
  
  <pre><code>&lt;?php
  //validation done here
   if(mail($toEmail, $subject, $body, $headers)){
                      // Email Sent
                      $msg = 'Your email has been sent';
                      $msgClass = 'alert-success';
  
                  } else {
                      // Failed
                      $msg = 'Your email was not sent';
                      $msgClass = 'alert-danger';
  
                  }
                  header('Location:index.php#bottomOfPage');
  ?&gt;
  
  
   //remaining html goes here 
      &lt;?php if($msg != ''): ?&gt;
  
          &lt;div class="alert &lt;?php echo $msgClass; ?&gt;"&gt;&lt;?php echo $msg; ?&gt;&lt;/div&gt;
  
      &lt;?php endif; ?&gt;
      &lt;a name="bottomOfPage"&gt;&lt;/a&gt;
      //form is here
  </code></pre>