You might want to switch your cfif statement. I think it is backwards. If
the recordcount is greater or equal to one that's a valid login, else if it
is zero, it was an invalid login.
Like:
<cfif Login.RecordCount IS 0>
<cflocation url="invalidlogin.cfm?">
<cfelseif Login.RecordCount IS GTE 1>
<cflocation url="validlogin.cfm?">
</cfif>
-----------------------------------------------
Kevin Kazmierczak, CCNA
Certified Advanced ColdFusion MX Developer
Alfred University
Alumni Hall
607-871-2334
[EMAIL PROTECTED]
-----Original Message-----
From: Sangeeta Karmokar [mailto:[EMAIL PROTECTED]
Sent: Friday, March 21, 2003 2:12 AM
To: CF-Talk
Subject: Another Challenging question
I am not sure how to add a new thread. So I am posting this message here..
I am a new user of CFMX and I am creating Login and Password page with
Access as Database. CAn anyone check as this CF script is ok:
<cfquery name="Login" datasource="Users">
SELECT * FROM Login
WHERE Usr_Name = #form.Usr_Name#
AND Usr_Password = #form.Usr_Password#
</cfquery>
<cfif Login.RecordCount IS 0>
<cflocation url="validlogin.cfm?">
<cfelseif Login.RecordCount IS GTE 1>
<cflocation url="invalidlogin.cfm?">
<cfelse>
</cfif>
<!--end login_action.cfm-->
Where Users is my datasource and Urs_Name and Urs_Password is my field
names.
Please can anyone help me.
Sangeeta
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4