dodo123456 0 Newbie Poster

I am working on LOGIN Module and all my code is ok.

on my localserver: the code works exactly fine. it gets login and gets logs out..

On my Host using sql server 2005..

I just try to login and it does not get logged in.

no case sestiveness applied there.

On my OnSessionStart Method:

i have use sessions like:

<cfset session.islog = False>
<cfset session.user = "">

and on logincheck page: i am setting these values to True and the user's Name as:

<cfset session.islog = True>
<cfset session.user = "#a.username#">

But when i try CFDUMP my sesssions did get populated with values.

I tried every bit but could work on it..

Here is code i am using

<!--- If Submit Button was pressed do the following form validation --->
<cfif IsDefined("Form.loginnow")>
<!--- Replace the following message with whatever code should be processed --->
<cfinvoke component="admin.com.music" method="checklogin" returnvariable="login">
<cfinvokeargument name="c_username" value="#trim(form.musername)#">
<cfinvokeargument name="c_password" value="#trim(form.mpassword)#">
</cfinvoke>
<!--- IF there was a matching login record, the user is logged in --->
<cfif login.RecordCount EQ '1'>
<cfset session.user = #login.user_name#>
<cfset session.IsLoggedIn = True>
<cfset session.pass = #login.user_pass#>
<cfset session.userID = #login.user_id#>
<cfset session.email = #login.user_email#>
<cfcookie name="myname" value="#login.user_name#" expires="never">
<cflocation addtoken="no" url="#CGI.SCRIPT_NAME#?#CGI.QUERY_STRING#">
<cfelse>
<cfset Err1 = "Error! Invalid Account Information">
</cfif>
</cfif>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.