title: Avoid using isset in PHP when accessing $_POST, $_GET, and other variables?
body: <p>how can I prevent PHP from returning an <strong>Undefined variable</strong> error every time I try to check a variable if it has contents and that certain variable hasn't been used yet? In my previous setup, I can check $_POST['email'] even if I haven't put anything into it yet. It simply returns a blank or empty result. That's how I want my PHP setup to work but for the life of me, I can't seem to find figure out how to configure it. :(</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;?php
  if ($_POST['info'] != '') {
    // do some stuff
  }
  ?&gt;
  &lt;form method="post"&gt;
  &lt;input type="text" name="info" /&gt;
  &lt;input type="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>When you use the above script in a single PHP page and run it on my current setup, it returns an <strong>Undefined variable</strong> error. On my previous setup, that script worked like a charm. Can anyone share some light into this problem of mine. If you need further details, just say so and I will try to add more details to this post.</p>
  
  <p>I <strong>know</strong> about the <strong>isset()</strong> checking but I don't want to use it on all of my scripts. I want it to <strong>not</strong> be that <strong>restrictive</strong> about variables.</p>