problem with cflogin
hello everybody,
I am very new to this forum and cold fusion, actually i first used cold fusion about a week ago so my coding is very basic. What i am trying to achieve is a member login page on my website where users can just enter my site and if they want to login the can press the link "login". i have already created a member register page that it fully working and sends the information that the user enters to my database.
The software i am using is: cold fusion developer edition in dreamweaver, and mysql workbench.
I have already started coding witch i will paste bellow. I have created a cfc for my loginpage.cfm and i am using <cflogin> in the cfc.
Heres all of the code i have created on the memberlogin.cfc file:
<cfcomponent>
<cffunction name="memberlogin" access="public" returntype="void">
<cflogin>
<cfif IsDefined("form.email")>
<cfquery datasource="#application.datasource#"
name="quser">
SELECT * FROM members
WHERE email='#form.email#'
AND password='#form.password#'
</cfquery>
<cfif quser.recordcount IS 1>
</cfif>
<cfloginuser name="#quser.email#"
password="#form.password#"
roles="#quser.roles#">
</cflogin>
</cffunction>
</cfcomponent>
And here is the code in the top of my login.cfm file:
<cfinvoke
component="Fusionmods.cf.cfc.memberlogin"
method="memberlogin">
</cfinvoke>
The problem i have no idea if i can login, i mean when i look at a email and password from my database and type it in to the login page on my site i have no idea weather i am logged in or not
I was wondering if anybody could tell me how i could add a automatic link so that when a member has sucessfully logged in it takes them to the home page and if they loggin incorrectly the login page appears again??
Thank you.
