Results 1 to 2 of 2

Thread: Cookies

  1. #1
    Join Date
    Dec 1969

    Default Cookies

    Hi,<BR>I know that the question about checking for cookies was asked below, here is what I want to know. I want to pull off a user id from the cookie(if it exists) and check it against a list of user ids in a database.<BR>So what I need is: a script to check for a cookie and if one exists then check the userid with a database. If a cookie does not exist then it should get the user to login and then check the database.<BR>Thanx<BR>Lucy

  2. #2
    Join Date
    Dec 1969

    Default RE: Cookies

    Try This:<BR><BR>if request.cookies("ID") &#060;&#062; "" then<BR> strSQL = "SELECT * from logins where UID = " & *request.cookies("ID")<BR> strsql,cn<BR> if rs.eof=false then<BR> response.redirect "loggedin.asp"<BR> else<BR> response.redirect "login.asp<BR> end if<BR>else<BR> response.redirect "login.asp<BR>end if

Posting Permissions

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