title: my code is working fine till the first if statement after that my code is getting printed on screen
body: <pre><code> &lt;?php
  
       $error="";$successMessage="";
  
      if($_POST) {
  
      $error="";
  
      if(!$_POST("email"))
      {
      $error .="An email address is required&lt;br&gt;";
      }//code works fine till here 
  
     //from here on the code gets printed on screen and is not working 
      if(!$_POST("content")){
      $error.="The content field is required&lt;br&gt;";
      }
  
      if(!$_POST("subject")){
      $error.="The subject is required&lt;br&gt;";
      }
  
      if ($_Post['email'] &amp;&amp; filter_var($_POST("email"), FILTER_VALIDATE_EMAIL)===false) {
      $error .="$email is not a valid email address. &lt;br&gt;";
      }
  
  
      if($error !==""){
  
      $error='&lt;div class="alert alert-danger" role="alert"&gt;&lt;p&gt;&lt;strong&gt;There were error(s) in your form&lt;/strong&gt;&lt;/p&gt;'. error . '&lt;/div&gt;';
      }
  
      else
      {
      $emailTo="vibhorvimal5598@gmail.com";
  
      $subject=$_POST("subject");
  
      $content=$_POST("content");
  
      $headers="From:"$_POST('email');
  
      if(mail($emailTo,$subject,$content,$headers)){
      $successMessage='&lt;div class="alert alert-danger" role="alert"&gt;&lt;p&gt;&lt;strong&gt;Your message was sent&lt;/strong&gt;&lt;/p&gt;'. error . '&lt;/div&gt;';
      }
  
      }
      ?&gt;
  </code></pre>
  
  <p>what is wrong in this code can anyone please explain because I already checked for the syntax and error and all . I don't know what is wrong and why this is happening.
  Can anyone please help me out and tell why the code is not working correctly after first if statement</p>