title: why in this isset and !empty if block else statement executing by default?
body: <pre><code>&lt;?php
  if( isset($_POST['pass']) &amp;&amp; !empty($_POST['pass']) )
  {
      $pass = $_POST['pass'];
      echo 'ok';
  } else {
      echo 'Enter Password';
  }
  ?&gt;
  &lt;form action="md.php" method="POST"&gt;
  Password: &lt;input type="password" name="pass"&gt;&lt;br&gt;&lt;br&gt;
  &lt;input type="submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The problem is that when I run this code then by default I see the message <code>Enter Password</code> displayed above the password field somehow the else condition is getting executed when I open this page on xampp server that <code>else</code> block is supposed to execute when the user submits empty form and not when I open the page on the server.</p>