Here is the code for the login page right from DW 8
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/username_db.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString <> "" Then MM_LoginAction =
MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername = CStr(Request.Form("Username"))
If MM_valUsername <> "" Then
Dim MM_fldUserAuthorization
Dim MM_redirectLoginSuccess
Dim MM_redirectLoginFailed
Dim MM_loginSQL
Dim MM_rsUser
Dim MM_rsUser_cmd
MM_fldUserAuthorization = "Approved"
MM_redirectLoginSuccess = "loggedin.asp"
MM_redirectLoginFailed = "fail_login.asp"
MM_loginSQL = "SELECT Username, Password"
If MM_fldUserAuthorization <> "" Then MM_loginSQL =
MM_loginSQL & "," & MM_fldUserAuthorization
MM_loginSQL = MM_loginSQL & " FROM Info WHERE Username =
? AND Password = ?"
Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
MM_rsUser_cmd.ActiveConnection = MM_username_db_STRING
MM_rsUser_cmd.CommandText = MM_loginSQL
MM_rsUser_cmd.Parameters.Append
MM_rsUser_cmd.CreateParameter("param1", 200, 1, 255,
MM_valUsername) ' adVarChar
MM_rsUser_cmd.Parameters.Append
MM_rsUser_cmd.CreateParameter("param2", 200, 1, 50,
Request.Form("Password")) ' adVarChar
MM_rsUser_cmd.Prepared = true
Set MM_rsUser = MM_rsUser_cmd.Execute
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") =
CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And
false Then
MM_redirectLoginSuccess =
Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<link rel="shortcut icon" href="images/favicon.ico" >
<link rel="icon" href="images/animated_favicon1.gif"
type="image/gif" >
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Welcome to the Nevada Turcich
Website</title>
<style type="text/css">
<!--
.style1 {font-size: 24pt}
.style3 {font-size: 14pt}
.style5 {font-size: 12pt}
-->
</style>
<link rel="shortcut icon" href="images/favicon.ico" >
<link rel="icon" href="images/animated_favicon1.gif"
type="image/gif" >
</head>
<body>
<div align="center" class="style1">
<a href="
http://www.wunderground.com/US/NV/Carson_City.html?bannertypeclick=big2">
<img src="
http://banners.wunderground.com/weathersticker/big2_both_cond/language/www/US/NV/Carson_City.gif"
border=0
alt="Click for Carson City, Nevada Forecast" height=60
width=468></a><br />
Welcome to the Nevada Turcich Website<br />
<span class="style3"><a
href="index.asp">Home</a> | <a
href="prop/index.asp">Property</a> | <a
href="family/index.asp">Family</a> | <a
href="media/index.asp">Media</a><a
href="media.asp"></a></span> <br />
</div>
<div align="left">
<p align="center">This Site is Currently Under
Construction so some features may not work.<br />
But keep checking back as updates to the site are made
daily.</p>
</div>
<div align="center">
<script type="text/javascript"
SRC="javascript/date.js"></SCRIPT>
<br />
<p><span class="style5">You must be a User to
View this website!</span></p>
<p align="right"><a href="reg.asp">Click
here</a> to register </p>
<table width="317" height="249" border="1"
align="right">
<tr>
<td height="243" valign="top"><form
id="login_index" name="login_index" method="POST"
action="<%=MM_LoginAction%>">
<label for="label6">
<div align="left">
<p>If you have been approved please enter your
information <br />
</p>
</div>
</label>
UserName:
<input type="text" name="Username" id="Username" />
<br />
<label for="label7">Password: </label>
<input name="Password" type="password" id="password"
maxlength="8" />
<br />
<br />
<br />
<label for="label8">Submit</label>
<input type="submit" name="Submit2" value="Submit"
id="label8" />
</form></td>
</tr>
</table>
<p>If you have an RSS Reader you can click here an get
the latest news and Events.</p>
<p>If you dont have an RSS reader click here for a
list of readers. </p>
<p align="center"> </p>
<p align="center">This website is Hosted By:
</p>
<p align="center"><a href="
http://www.1and1.com/?k_id=11076485"
target="_blank"><img src="
http://banner.1and1.com/xml/banner?size=3%26%number=2"
width="120" height="60" alt="Banner"
border="0"/></a></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Copyright 2006 David Star Enterprises </p>
<p>This Site was designed by David Star
Enterprises<br />
An Idaho and Nevada Company </p>
</div>
</body>
</html>