title: In where shall I use isset() and !empty()
body: <p>I read somewhere that the <code>isset()</code> function treats an empty string as <code>TRUE</code>, therefore <code>isset()</code> is not an effective way to validate text inputs and text boxes from a HTML form.</p>
  
  <p>So you can use <code>empty()</code> to check that a user typed something.</p>
  
  <ol>
  <li><p>Is it true that the <code>isset()</code> function treats an empty string as <code>TRUE</code>?</p></li>
  <li><p>Then in which situations should I use <code>isset()</code>? Should I always use <code>!empty()</code> to check if there is something?</p></li>
  </ol>
  
  <p>For example instead of </p>
  
  <pre><code>if(isset($_GET['gender']))...
  </code></pre>
  
  <p>Using this</p>
  
  <pre><code>if(!empty($_GET['gender']))...
  </code></pre>