logging in a user
Hi, I posted the other day and was told to read up on different scopes of variables and felt stupid because it was so simple.
So I figured out how to log in users and do what I want to do, but I have one problem.
My website has a sidebar which contains the login form. The sidebar is an include used for the whole site. When I set everything up to log in a user, and test it, when i'm previewing sideLogin.cfm on its own, it does what it should. I preview sideLogin.cfm and it works, then goes to sideLoggedin.cfm and shows that the user is logged in. All that sidebar.cfm has is:
<cfif IsDefined("Session.Username")>
<cfinclude template="sideLoggedin.cfm">
<cfelse>
<cfinclude template="sideLogin.cfm">
</cfif>
Also, when I log in using nothing but sideLogin.cfm which goes to sideLoggedIn.cfm, sideLoggedin.cfm shows the user is logged in, but then when I go to index.cfm (or any other page), in the same session, I see sideLogin.cfm even though I know that the session variable has been set.
I should also mention that I did most of this stuff in Dreamweaver CS4 and applied the user authentication server behavior to the form--not Coldfusion code.
