Thanks Dave... I implemented the changes. I need all the help I can get
(LOL)
I am now having trouble with the condition of if the correctLogin
variable is false or undefined or if the form.userName is undefined. I
get either a loop (when I dont have the <cfabort> in there) or a timeout
(when I take those out.
Thanks again for all your help. :)
<!-- Login for admin area -->
<CFAPPLICATION NAME="APOOOAdmin"
CLIENTMANAGEMENT="Yes"
SESSIONMANAGEMENT="Yes"
SETCLIENTCOOKIES="Yes"
SESSIONTIMEOUT="#CreateTimeSpan(0,1,0,0)#"
APPLICATIONTIMEOUT="#CreateTimeSpan(1,0,0,0)#"
CLIENTSTORAGE="COOKIE">
<!---
Next check to see if the login form has been submitted,
if yes then try to authenticate the user.
--->
<cfparam name="Session.correctLogin" default="">
<CFIF IsDefined("form.username")>
<cfquery name="getUsers" datasource="apooo">
Select UserID, UserPassword from USERS Where
UserID = <cfqueryparam value="#form.UserName#">
</cfquery>
<cfif form.Password IS getUsers.UserPassword AND form.UserName IS
getUsers.UserID>
<cfset Session.CorrectLogin = TRUE>
<cfelseif getUsers.RecordCount EQ 0>
<cfset Session.CorrectLogin = FALSE>
Sorry, your username or password does not match.<br>
<a href="mailto:[EMAIL PROTECTED]">Get help</a>
<cfelseif form.Password IS NOT getUsers.UserPassword>
<cfset Session.CorrectLogin = FALSE>
Sorry, your username or password does not match.<br>
<a href="mailto:[EMAIL PROTECTED]">Get help</a>
</cfif>
</CFIF>
<cfif Session.CorrectLogin IS FALSE>
<cflocation url="login.cfm">
<cfabort>
<cfelseif Session.CorrectLogin IS "">
<cflocation url="login.cfm">
<cfabort>
</cfif>
Candace K. Cottrell, Web Developer
The Children's Medical Center
One Children's Plaza
Dayton, OH 45404
937-641-4293
http://www.childrensdayton.org
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4