URGENT HELP!
From: Athmaus (c0llegeguy99@yahoo.com)
Date: 02/26/03
- Next message: Sue Hoegemeier: "Re: job execution sql agent"
- Previous message: Brian Moran: "Re: MDAC 2.5 Buffer Overrun with long servernames?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Athmaus" <c0llegeguy99@yahoo.com> Date: Tue, 25 Feb 2003 19:05:15 -0800
I cant get this login script to work:
OK, below is my entire login script. The person needs to
input their first name, lastname, and password correctly
ebvfore they can go to next page. So far it doesnt do
that. And i dont think it is secure, meaning that as long
as the person knows a valid first name, last name, and
password, they can get in.
ANyone know of any fixes for this?
THANK YOU SOOOOOOOOOOOO MUCH!!!!!!!
<html>
<head>
<title>Login Page</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<blockquote>
<p>
<%
Response.Expires = -1000 'Make sure the browser doesnt
cache this page
Response.Buffer = True 'enables our response.redirect to
work
Dim myconn, rs, SQL, last, first, serial
Set myconn = Server.CreateObject("ADODB.Connection")
myconn.Open "Provider=SQLOLEDB;Data
Source=XXXXX;UID=XXXXX;PWD=XXXXX;DATABASE=XXXXX"
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * FROM Login"
'SQL = "SELECT fname, lname, serial FROM User Where
UserName = '" & UN & "'"
rs.Open SQl, myConn
last = "SELECT fname FROM Login"
first = "SELECT lname FROM Login"
serial = "SELECT serial FROM Login"
'set recordSet = Server.CreateObject("ADODB.Recordset")
'recordSet.Open "SELECT * FROM
If Request.Form("valuepassed") ="true" Then
CheckLoginForm
Else
ShowLoginForm
End If
Sub CheckLoginForm
'check if the value of the text field 'password' is
correct
If Request.Form("fname") = first AND Request.Form
("lname") = last AND Request.Form("password") = serial
Then
Session("BlnLoggedIn") = True
Response.Redirect "http://www.yahoo.com"
Else
Response.Write("Password, please try again.<br>")
ShowLoginForm
End If
End Sub
%>
<% Sub ShowLoginForm %>
</p>
</blockquote>
<!-- start the html login form -->
</p>
<form name="form" action="test.asp" method="post">
<input type="hidden" name="valuepassed" value="true">
<table width="344" border="0" cellspacing="0"
cellpadding="0" align="left">
<tr>
<td height="24"><font size="2" face="Verdana, Arial,
Helvetica, sans-serif">First Name:</font></td>
<td><input type="fname" id="fname"></td>
<td> </td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-
serif">Last Name:</font></td>
<td><input type="lname" id="lname"></td>
<td> </td>
</tr>
<tr>
<td width="88"><font size="2" face="Verdana, Arial,
Helvetica, sans-serif">Password: </font></td>
<td width="151">
<input type="password" name="password">
</td>
<td width="105">
<div align="center">
<input type=submit value="Login" name="submit">
</div>
</td>
</tr>
</table>
<div align="left"> </div>
</form>
<!-- end the html login form -->
</div>
<% End Sub %>
</body>
</html>
- Next message: Sue Hoegemeier: "Re: job execution sql agent"
- Previous message: Brian Moran: "Re: MDAC 2.5 Buffer Overrun with long servernames?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|