My site has a list of users and each user is a member of different areas (groups, locations, etc). Instead of making a DB call every time I want to make a list, I want to store the array variables in session.
    //creates the array of groups that the user is in
    $_SESSION['gx']=mysql_query("SELECT * FROM `members` WHERE `user`='$user'");
Now my page loads and session_start() runs. However, when my page goes to retrieve that session variable, it's not there. Any suggestions?
Thanks


mysql_querydoes not return an array ... it returns a result resource ... you'll need to build the array from the query result ...