I used application objects/User authentication to build this
login page. I, also, set session management = "yes" in my
Application.cfm. Still, the login page will not take me to the next
page qry_jobtkt.cfm. I don't get a database error either.
Am I missing something?
Here is the code:
<cfapplication name="Graphics" >
<cfif IsDefined("FORM.username")>
<cfset MM_redirectLoginSuccess="qry_jobtkt.cfm">
<cfset MM_redirectLoginFailed="index.cfm">
<cfquery name="MM_rsUser" datasource="qords"
username="dw" password="9">
SELECT username,password FROM dbo.users WHERE
username='#FORM.username#' AND password='#FORM.password#'
</cfquery>
<cfif MM_rsUser.RecordCount NEQ 0>
<cftry>
<cflock scope="Session" timeout="30" type="Exclusive">
<cfset Session.MM_Username=FORM.username>
<cfset Session.MM_UserAuthorization="">
</cflock>
<cfif IsDefined("URL.accessdenied") AND false>
<cfset MM_redirectLoginSuccess=URL.accessdenied>
</cfif>
<cflocation url="#MM_redirectLoginSuccess#"
addtoken="no">
<cfcatch type="Lock">
<!--- code for handling timeout of cflock --->
</cfcatch>
</cftry>
</cfif>
<cflocation url="#MM_redirectLoginFailed#"
addtoken="no">
<cfelse>
<cfset MM_LoginAction=CGI.SCRIPT_NAME>
<cfif CGI.QUERY_STRING NEQ "">
<cfset MM_LoginAction=MM_LoginAction & "?" &
XMLFormat(CGI.QUERY_STRING)>
</cfif>
</cfif>
<!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>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>GRAPHICS</title>
</head>
<html>
<body>
<form>
<input name="GRAPHICS" type="text" value="GRAPHICS
BILLING" size="30" maxlength="20" readonly="true" />
<form
action="<cfoutput>#MM_loginAction#</cfoutput>"
method="POST" name="index" >
<input name="username" type="text" size="20"
maxlength="20" id="User"/>
<input name="password" type="password" size="10"
maxlength="10" ID="Password"/>
<input name="SUBMIT" type="submit" value="SUBMIT">
</form>
</body>
</html>