There are several login tags available, but the best way is to just have a page that loggs the user in. I normally use a page called Login.cfm. All this page does is, checks the users information that they posted on the login form against the database, and if they are valid, I set some application level variables and the like, then redirect them to the appropriate page. If they do not have a account or did not enter their infrmation correctly, they are redirected to the login page with a message of what they did wrong.
So for instance, the code could look like this: Validate the user againstthe database <cfquery datasource="#Application.DSN#" Name="qry_CheckUser"> Select Fname, Lname, UserID, Password From Users Where #TRIM(Users.UserID = Form.UserID)# AND #TRIM(Password = Form.Password) </cfquery> Check to see if the information is valid <cfif (qry_CheckUser.Recordcount) IS "1"> set application, session or client variables here and redirect them with cflocation <cfelse> Set error message to display and send them back to the login page displaying the error message. </cfif> This is a very simplified login routine. Like I said, there are several out there on the Developers Exchange. Just do a search for Login. ----- Original Message ----- From: "Scott Wilhelm" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 10:52 AM Subject: How can I redirect a user? > I'm setting up authentication against a database, and I have the form > data going to a seperate page that I want users not to see (just a > preference of mine)...Once the page is done processing, I want to push > the users off to a different page...How do I do that? Are there any CF > tags for it? > > Thank you, > > Scott > > PS. I'm very wet behind my ears, so if there's some tricks for > authenticating against a db, please feel free to tell me. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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