Print Page | Close Window

Login page

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1856
Printed Date: 28 March 2026 at 11:14pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Login page
Posted By: skincla
Subject: Login page
Date Posted: 16 April 2003 at 10:22am

Hi,

I am pretty new to ASP and am trying to create a login page for a site. The form sends the username and password to this page:

<mailto:%@LANGUAGE="VBscript"%'>%@LANGUAGE="VBScript"%>
<%
Response.Expires = -1000 'Makes the browser not cache this page
Response.Buffer = True 'Buffers the content so our Response.Redirect will work
Session("UserLoggedIn") = ""
Session("OwnerLoggedIn") = ""

' *** Connect to database***
Dim myConn

Set myConn = Server.CreateObject("ADODB.Connection")
myConn.open "Human","","dragon"

' *** Read the search form variable ***
Dim uName, uPassword

uName = CStr(Request("username"))
uPassword = CStr(Request("password"))

' *** get data ***
Dim mySQL

mySQL = "SELECT * FROM User WHERE Username = '"  & uName & "' AND Password = '"  & uPassword & "'"

' *** Record Set ***
Dim myRS

Set myRS = myConn.Execute(mySQL)

If myRS.BOF And myRS.EOF Then
Response.Redirect "index.htm"
Else
Session("UserLoggedIn") = "true"
If(myRS.Fields.Item("Security_ID").Value) = "2" then
Session("OwnerLoggedIn") = "true"
Response.Redirect "../Owner/OwnerPage.asp"
Else
Response.Redirect "UserPage.asp" & "?Userid=" & myRS("User_ID")
End if
End If
myConn.Close
Set myRS = Nothing
Set myConn = Nothing
%>

but the page won't display! (this page cannot be displayed) any ideas?




Replies:
Posted By: faubo
Date Posted: 16 April 2003 at 10:49am

turn off the Friendly Error Messages in your brownser options, this way you will see where is the problem in your code, and what the problem is.

Then we can help you.



-------------
http://www.conhecerparaconservar.org - I don't know how to make you click here



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net