# Detetc user\_type login help

**URL:** <https://forum.kirupa.com/t/detetc-user-type-login-help/220140>\
**Category:** Uncategorized\
**Created:** [March 23, 2007, 3:31am UTC](https://forum.kirupa.com/t/detetc-user-type-login-help/220140 "2007-03-23T03:31:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixeldude](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pixeldude](https://forum.kirupa.com/u/pixeldude)\
**Post date:** [March 23, 2007, 3:31am UTC](https://forum.kirupa.com/t/detetc-user-type-login-help/220140/1 "2007-03-23T03:31:33Z")

</div>

Hi nice people out there…

Okay currently I’m working on my log system for my office use…so my purpose is just wanna seek advise/guide from php guru’s here…the best/proper way to code this…Okay my problem is here…how to differentiate user level after the user success logging into the system…because what I’m working is now…I have 3 different page depends on user type after successing login…let’s say I have this type of record in my dtbase…

id | username | password | user\_type |

* * *

0 | user1 | pwd | director |  
1 | user2 | pwd2 | sa |  
2 | user3 | pwd3 | programmer|

so the scenario is if the director login it’ll redirect to “directorindex.php” page  
-and if sa succesing login into system it’ll redirect to “saindex.php” page and so on…

so I really need help on how to detect user\_type after the login process because I want to redirect to the correct page…hope will get some shed on light on it…

thanks in advanced
