Looks like you need to put single quotes around your #form.Usr_name# and
#form.User_Password# variables

<cfquery name="Login" datasource="Users"> 
SELECT * FROM Login 
WHERE Usr_Name = '#form.Usr_Name#' 
AND Usr_Password = '#form.Usr_Password#' 
</cfquery>

other than that it looks ok to me

Greg Hamm
Partner
Coreillia Development
[EMAIL PROTECTED]
http://www.coreillia.com


-----Original Message-----
From: Sangeeta Karmokar [mailto:[EMAIL PROTECTED] 
Sent: March 20, 2003 11:12 PM
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to