%@ Language = "VBScript" %> <% Option Explicit Response.Buffer = True '********************************************************** ' To make this script work you simply need to create a ' table named tblLoginInfo in your database with three ' columns: username, password, and destination. Put ' the values you want for username and password into a ' record in the table and in destination put the url you ' want to send that user to. ' ' NOTE: BE SURE TO EITHER MOVE THE INCLUDED SAMPLE ' DATABASE TO A SECURE AREA OUTSIDE THE WEB SITE OR ' USE A DIFFERENT SECURE DATABASE. OTHERWISE ANYONE ' CAN SIMPLY DOWNLOAD THE WHOLE DB AND RETREIVE YOUR ' USERNAME AND PASSWORD FROM IT. '********************************************************** %>
These links to the user's pages wouldn't be here in the real world. I'm just putting them here for you to play with. You should only be able to actually go to the page belonging to the user that you are logged in as. If you haven't yet logged in or tried to log in with invalid credentials then you won't be able to go to any of them.
Login Failed - Please verify username and password.
<% 'Response.End Else Session("username") = rstLogin.Fields("username").Value strURL = rstLogin.Fields("destination").Value Response.Redirect("destinations/" & strURL) End If ' Clean Up rstLogin.Close Set rstLogin = Nothing cnnLogin.Close Set cnnLogin = Nothing End If %>