I have one function that is $inloggad = $_SESSION['sess_user']; this function is to get the username from the logged in member

my other function is $usertype= mysql_query("SELECT usertype FROM members WHERE usertype = 'write'");

and I want to replace write in the end of that function with $inloggad but I just can't get it right.

any idea of how to do this?