title: PHP page redirect
body: <p>Can PHP make a redirect call after executing a function?  I am creating a function on the completion of which I want it to redirect to a file located in the same root folder.  Can it be done?</p>
  
  <pre><code>if (...) {
      // I am using echo here.
  } else if ($_SESSION['qnum'] &gt; 10) { 
      session_destroy();
      echo "Some error occured.";
      // Redirect to "user.php".
  }
  </code></pre>