DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   ColdFusion (http://www.daniweb.com/forums/forum19.html)
-   -   Setting up user name and password (http://www.daniweb.com/forums/thread8282.html)

cfnut Jul 21st, 2004 5:20 pm
Setting up user name and password
 
I have a page where the user can enter his username and password. Does anyone have any examples on how to check the database for to make sure the user matches the username and password.

Thanks!!!

dazzlindonna Jul 21st, 2004 9:35 pm
Re: Setting up user name and password
 
Something like this should do it:

<CFQUERY name="login" datasource="#dsn#">
SELECT *
FROM Users
WHERE UserName='#username#'
AND Pwd = '#pwd#'
</CFQUERY>

Of course your datasource, table name, fieldnames, and variables have to match your situation.


Quote:

Originally Posted by cfnut
I have a page where the user can enter his username and password. Does anyone have any examples on how to check the database for to make sure the user matches the username and password.

Thanks!!!


cfnut Jul 21st, 2004 11:41 pm
Resolved
 
Thanks, worked good.


All times are GMT -4. The time now is 3:42 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC