title: PHP Notice: Undefined index: ID
body: <p>Can someone help me with a simple fix about my code of an simple function? thanks before!!
  Im getting that error into my logs: <strong>PHP Notice:  Undefined index: ID</strong></p>
  
  <pre><code>    function hasMembership($odb) {
          $SQL = $odb -&gt; prepare("SELECT `expire` FROM `users` WHERE `ID` = :id");
          $SQL -&gt; execute(array(':id' =&gt; $_SESSION['ID']));
          $expire = $SQL -&gt; fetchColumn(0);
          if (time() &lt; $expire)
          {
              return true;
          }
          else
          {
              $SQLupdate = $odb -&gt; prepare("UPDATE `users` SET `membership` = 0 WHERE `ID` = :id");
              $SQLupdate -&gt; execute(array(':id' =&gt; $_SESSION['ID']));
              return false;
          }
      }
  </code></pre>