dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: get info from sess_user

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Posts
    15

    get info from sess_user

    I have an homepage there you can register and log in.

    I have a table in my database named members with a number of members.
    In that table I have a field called usertype where I have some members who have "read" and some that have "write" as usertype.

    I wounder if there is any way that I can get information from the current logged in member to see if the member has write or read as usertype.

  2. #2
    Join Date
    Mar 2012
    Posts
    3

    Need more info

    Hi,

    I need more info to help you.

    Have you made the homepage yourself or is it a base system that has premade register and login functions?

    1. You could add the value in field "usertype" to another session and use that to fetch the value.

    $usertype = 'read';
    $_SESSION['usertype']=$usertype;

    read more here:
    http://w3schools.com/php/php_sessions.asp

    2. Or you can fetch the value each time you need to use it.

    maybe this can help
    http://w3schools.com/php/php_mysql_select.asp

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles