CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: check cookies

  1. #1
    Join Date
    Oct 2002
    Location
    asian
    Posts
    116

    check cookies

    1.) Is there a way i can check if a cookie was created in a particular session?

    2.) Does anyone knows the easiest way to check if a user was logged in or not before opening a page?
    Thanks!!!
    Kristine

  2. #2
    Join Date
    Oct 2003
    Location
    India
    Posts
    3

    Reply for check cookies

    1.To indentify that a cookie is created on particular session you first know the session id. If a user logon a particular session Id will be created this is unique id. Using this id you can verify that the cookie is creeated on this session or not.


    2. TO verify a user is logged in or not, the easiest way is to create one session variable for example session("login"). Store the userId in that variable. If the session("login") is empty then you can easily identify the user is not logged in.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured