View Single Post
  #2 (permalink)  
Old Apr 13th, 2007, 16:38
JustinStudios's Avatar
JustinStudios JustinStudios is offline
SuperMember

SuperMember
Join Date: Mar 2007
Location: USA
Posts: 404
Blog Entries: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Security using forms

I just now found this thread... sorry it took so long to reply... but yes this can be done quite easily...

What you need to do is create a database that has 3 fields.

1) Username
2) Password
3) Url

Then when the user logs in it checks if Username = (any username in the database) then see if the password matches the field where username (in database) is = to username (on form).

Then you need to include something that will send the url to the browser depending on success...

Let's say you got the username and password and they passed. So we set variable success = 1. If it didn't we set variable success = 0. Lets also say that you set your recordset query = rsquery here's some code below to do the browser.

Code: Select all
if success = 1 then
   response.redirect(rsquery("Url"))
else
   response.redirect("http://servername/failed.asp")
end if

Last edited by JustinStudios; Apr 13th, 2007 at 16:39. Reason: mistyped code tags
Reply With Quote