Hi, I was looking for help with distinguishing between user types on my website. I currently have a table in my MySQL database containing users, and within that table the "type" of user is identified (either agent or purchaser). I then proceed to initiate a session as normal, extracting the type column for each user as they login using $_SESSION['type']. This seems to function ok, when i use an echo, the PHP prints the user type out and it seems to work. However, i'm trying to restrict access to a page using an if statement so i have if((@$_SESSION['auth']) && ($_SESSION['type']='agent')) { //Show page content } else { //Don't show content } However, when i do this, the page restriction does not work. I've experiment with variations on the above code, and had success initially, but the $_SESSION['type'] actually appears to change itself when i modify the code on some occasions, e.g. I managed to get functionality as required when i used ...['type']!='purchaser' Any ideas as to the problem, or any suggestions as to an alternative method of distinguishing between member types. Thanks Nick