title: I want to query from database where registration number is the one used to logged in with?
body: <p>I want to use the registration that a student has logged in to the system to enable him to view his/her clearance request process from my database using <code>SESSION</code>.</p>
  
  <p>I have tried this code:</p>
  
  <pre><code>$sql = "SELECT clearanceid, regno, names, progcode, status, pfno, reasons 
          FROM clearance 
          WHERE regno='.$_SESSION['regno'].'"; 
  </code></pre>