title: If isset $_POST
body: <p>I have a form on one page that submits to another page. There, it checks if the input <code>mail</code> is filled. If so then do something and if it is not filled, do something else. I don't understand why it always says that it is set, even if I send an empty form. What is missing or wrong?</p>
  <p><code>step2.php</code>:</p>
  <pre><code>&lt;form name=&quot;new user&quot; method=&quot;post&quot; action=&quot;step2_check.php&quot;&gt; 
      &lt;input type=&quot;text&quot; name=&quot;mail&quot;/&gt; &lt;br /&gt;
      &lt;input type=&quot;password&quot; name=&quot;password&quot;/&gt;&lt;br /&gt;
      &lt;input type=&quot;submit&quot;  value=&quot;continue&quot;/&gt;
  &lt;/form&gt;
  </code></pre>
  <p><code>step2_check.php</code>:</p>
  <pre><code>if (isset($_POST[&quot;mail&quot;])) {
      echo &quot;Yes, mail is set&quot;;    
  } else {    
      echo &quot;N0, mail is not set&quot;;
  }
  </code></pre>