title: How to redirect into different page by user type in php and mysql
body: <p>I want to redirect the users from the same log-in page.</p>
  
  <p>folder structure...</p>
  
  <pre><code>root
  |
  --------/application/app.php &lt;---------- for normal user
  |
  --------/administration/admin.php &lt;------- for admin user
  |
  -------- index.php (Log-in page)
  </code></pre>
  
  <p>User Table</p>
  
  <pre><code>ID       USER_NAME       PASSWORD      USER_TYPE
  1         admin           pass@admin    admin
  2         user            pass@user     user
  </code></pre>
  
  <p>If the login user's user type is admin then he/she will be redirected to <code>/administration/admin.php</code> else <code>/application/app.php</code>.</p>
  
  <p>How can I do it ?</p>
  
  <p>Regards,</p>