Password protection using a database

Results 1 to 2 of 2

Thread: Password protection using a database

  1. #1
    Join Date
    Dec 1969
    Posts
    294

    Default Password protection using a database

    I am trying to pwrd protect a site, I am very new to ASP (having come from a Cold Fusion background). How do I test the users name and password against a database and then redirect the user to the right page. At the same time pass variables from the database that match the users name (ID and access level)so I can check them on later pages.<BR>What would be the best place for me (some one who knows SQL)to learn ASP, quickly.<BR>If anyone can give me some advice, that would be great.

  2. #2
    Daniel Root Guest

    Default RE: Password protection using a database

    Well, this site is good, and I also use www.activeserverpages.com alot. They have 200+ articles that are very concise and show you all about Database connections, etc. What you&#039re wanting is very possible with ASP. You can use session variables to store the username/password:<BR><BR>&#060;%session("username") = request.form("Username")<BR>session("password") = request.form("password")%&#062;<BR><BR>From that point, any of your pages can lookup info in the database by issuing the SQL- SELECT * FROM myTbl WHERE Username = &#039"&session("username")&"&#039" and using ADO to get a field value:<BR><BR>UserOpts = rs("Options")<BR><BR>Look at activeserverpages for more on connecting to your database.

Posting Permissions

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