You need to create a session that will keep track of the user.
Retrieve the userid, and usertype from the database, and save this in the session. Or you can just save the userid, and query the database for the usertype when you want to check their usertype.
http://www.php.net/session www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!