title: PHP form not working (always_populate_raw_post_data = -1 )
body: <p>I am new to php, just trying to create a simple form but it's not working.
  here is my code</p>
  
  <pre><code>&lt;?php
  
  if (isset($_POST['user_input'])&amp;&amp;!empty($_POST['user_input'])){
  
  echo "THIS WORKS!!!";
  }
  ?&gt;
  &lt;hr&gt;
  &lt;form action="new.php" method="POST"&gt;
      &lt;textarea name="user_input" rows="6" cols="30"&gt; &lt;/textarea&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;input type="submit" value="Submit"&gt;
  
   &lt;/form&gt;
  </code></pre>
  
  <p>here is the error that appears on browser</p>
  
  <blockquote>
    <p>Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated
    and will be removed in a future version. To avoid this warning set
    'always_populate_raw_post_data' to '-1' in php.ini and use the
    php://input stream instead. in Unknown on line 0</p>
    
    <p>Warning: Cannot modify header information - headers already sent in
    Unknown on line 0</p>
  </blockquote>
  
  <p>I changed </p>
  
  <pre><code>always_populate_raw_post_data = -1 
  </code></pre>
  
  <p>in php.ini file</p>
  
  <p>Now the error message is not appearing but the code still not working 
  on clicking submit button the text in text area is erased and no output is produced
  using phpstorm ide and php 5.6.32</p>
  
  <p>this also not working </p>
  
  <pre><code>   &lt;?php
        error_reporting(E_ALL);ini_set('display_errors',1); 
       ?&gt;
      &lt;form method="POST"&gt;
      &lt;textarea name="user_input" rows="6" cols="30"&gt; &lt;/textarea&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;input type="submit" value="Submit"&gt;
  
      &lt;/form&gt;
      &lt;?php
  
         if (isset($_POST['user_input'])){
         echo "THIS WORKS!!!";
         }
      ?&gt;
  </code></pre>