Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_user_type($username){
- $query = mysql_query("SELECT * FROM users WHERE login='$username'");
- $row = mysql_fetch_array($query);
- if(!$row){
- return -1;
- }
- if($row['gosc_id'] == 1){
- return 0;
- }
- if($row['pracownik_id'] == 1){
- return 1;
- }
- if($row['admin_id'] == 1){
- return 2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement