Forum Moderators: open
Verify Script
<%
' Create a command object. This object serves to run our queries
Set Cm = Server.CreateObject("ADODB.Command")
' Specify the system DSN path
Cm.ActiveConnection = "LOGINDSN_SQL"
' Now it's time for the query. We need to check the user information
' against the table tUsers
Cm.CommandText = "SELECT * FROM tUsers WHERE " & _
"UserName='" & Request.Form("UserName") & "' AND " & _
"UserPassword='" & Request.Form("Password") & "' "
' Set the query type. 1 means it is a SQL statement
Cm.CommandType = 1
' Retrieve the results in a recordset object
Set Rs = Cm.Execute
' We now check if the user is valid. If user is valid, the recordset MUST
' haverecord. Otherwise it is empty. If user exists, we set authentication
' status to 1 and send the user to appropriate page, say welcome.asp.
' Else send the user back to login.asp
If Rs.EOF Then
Session("Authenticated") = 0
'Response.Redirect ("login.asp")
msg = "Incorrect username or password. <br> Please Click back on your browser and try again"
Else
Session("Username") = Request.form("username")
Session("Password") = Request.form("password")
Session("Authenticated") = 1
Session("User_Level") = Rs("User_Level")
'Response.Write Session("Username")
'Response.Write Session("User_level")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Update the User table add 1 to visit count and Punch Timestamp
Cm.CommandText = "Update tUsers " & _
"Set Last_Access='" & Now()& "' ," & _
"Visits = Visits + 1 Where Username='"&Session("Username")&"'"
' Set the query type. 1 means it is a SQL statement
Cm.CommandType = 1
' Retrieve the results in a recordset object
Set Rs = Cm.Execute
End If
if request.form("Cbox_change")= "ON" then
dim username, password
username = Request.Form("UserName")
password = Request.Form("Password")
response.redirect("returnuserinfo.asp")
else
Response.Redirect ("default.asp")
end if
%>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="365" height="200">
<tr>
<td width="365" height="200" align="center"><% Response.Write msg%>
</td>
</tr>
</table>
</center>
</div>
Ive been switching back and forth with IE versions, I believe the latest version doesnt allow you to press enter to execute a form, and that you rather have to press the submit button or something similar. Thats the only difference ive noticed, even it is applicable. Apart from that, your problem may be another factor and not IE6
Another off the wall question. Are you using FP2002 to design the forms? If so, there are some issues with FP2002 and forms. If the tags are not nested properly, the forms won't work.
<table width="291" bgcolor="#C0C0C0" border="1">
<form method="Post" action="http://ghs_corvu/verify.asp">
<td width="283">
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0" width="98%" bgcolor="#C0C0C0" style="border-style: solid; border-width: 2">
<tr>
<td width="100%" colspan="2" bgcolor="#000080"><font color="#FFFFFF">Please
enter your username and password</font></td>
</tr>
<tr>
<td width="91%">User Name</td>
<td width="50%"><input type="text" name="username" size="20"></td>
</tr>
<tr>
<td width="91%">Password</td>
<td width="50%"><input type="password" name="password" size="20"></td>
</tr>
<tr>
<td width="100%" colspan="2">
Click to Change User Information <input type="checkbox" name="Cbox_change" value="ON">
</td>
</tr>
<tr>
<td width="100%" colspan="2">
<p align="center"><br>
<input type="submit" value="Login Now" name="B1"></p>
</td>
</tr>
</table>
</center>
</div>
</form>
</table>
<table width="291" bgcolor="#C0C0C0" border="1">
<form method="Post" action="http://ghs_corvu/verify.asp">
<td width="283">
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0" width="98%" bgcolor="#C0C0C0" style="border-style: solid; border-width: 2">
Try moving it down to the next table...
<table width="291" bgcolor="#C0C0C0" border="1">
<td width="283">
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0" width="98%" bgcolor="#C0C0C0" style="border-style: solid; border-width: 2">
<form method="Post" action="http://ghs_corvu/verify.asp">
As soon as I upgraded to FP2002 a few months back, I started to have some problems with forms. After viewing the source code of those pages I realized that FP was adding the closing </form> tag right after the opening <form> tag and this had to do with nesting.
I'm not sure if it will solve the problem, but it may be a start. It solved mine!
P.S. Just ig me if I'm totally of course here!
<form>
<table></table>
</form>
Strictly speaking, no element should come between a table tag and its following table row and table cell tags. Form tags should be completely contained inside the <td></td> or outside the <table></table>.