Forums
This topic is locked
Save Username & Password
Posted 21 Mar 2003 15:32:08
1
has voted
21 Mar 2003 15:32:08 Leon Downes posted:
Hi,I am looking to allow users to save their login details by ticking a checkbox.
Users will login by entering their username in the UserName text field
and their password in the Password text field and will be logged in using the Login User Server behavior.
Thanks in advance
Replies
Replied 21 Mar 2003 17:05:23
21 Mar 2003 17:05:23 Vince Baker replied:
simplest way is to use a cookie.
When the user enters the username and password redirect them to a script page that does the following:
<%
Dim strUser, strPass
strUser = Request.Querystring("User"
strPass = Request.Querystring("Pass"
%>
(Run a recordset to check if the username and password are correct)
<% If rsYourRecordsetname.EOF and rsYourRecordsetname.BOF then Response.redirect("errorpage.asp"
else
Response.cookies("UserCookie"
= Request.Querystring("User"
Response.Cookies("UserCookie"
.Expires = Date + {enter no of days here}
then you can redirect them to confirm page.
Regards
Vince
Response.write("The best line of code you can ever use"
VBScript | ASP | HTML | SQL | Oracle | Hosting
When the user enters the username and password redirect them to a script page that does the following:
<%
Dim strUser, strPass
strUser = Request.Querystring("User"

strPass = Request.Querystring("Pass"

%>
(Run a recordset to check if the username and password are correct)
<% If rsYourRecordsetname.EOF and rsYourRecordsetname.BOF then Response.redirect("errorpage.asp"

Response.cookies("UserCookie"


Response.Cookies("UserCookie"

then you can redirect them to confirm page.
Regards
Vince
Response.write("The best line of code you can ever use"

VBScript | ASP | HTML | SQL | Oracle | Hosting