Michelle, I may be more of a CF Newbie than you, but maybe between the two of us, we can figure this out. Is the cflocation tag near the end (<cflocation url="admin/menu.cfm" ) the page thay you want cf to go to if the login succeeds? If so, maybe it should go after this: <cfset displayLoginForm = false>.
Lewis On Mon, Oct 25, 2010 at 5:08 PM, Michelle Dupray <[email protected]> wrote: > > I'm trying to creat a Simple Authentication login page to password protect > the content of a page on my site. Only two people will need to see the > content so there is no need to connect to a database. > > > Here is my login page. The login page works, however, you can stil access > the password protected page without it? What else do I need to do? > > > <cfset variables.PageTitle = "Graduate Guide Admin Login"> > > > <div style="top: 300px; z-index: -1; position: relative;"><cfinclude > template="/includes/footer.cfm"></div> > > > > <cflogin> > <cfset displayLoginForm = true> > <cfif isDefined("cflogin.name") AND IsDefined ("cflogin.password")> > <cfif cflogin.name is "GAdmin" and cflogin.password is "1430"> > <cfloginuser name="#cflogin.name# <http://cflogin.name/#>" > password="#cflogin.password#" roles="user"> > <cfset displayLoginForm = false> > </cfif> > </cfif> > > > > <cfif displayLoginForm> > <form action="admin_login.cfm" method="post" style="margin-top: -75px;"> > <p class="heading1" align="center"> Admin Login</p> > <table align="center"> > <tr > > <td>User: </td> > <td ><input type="text" name="j_username" style="width: > 150px;"></td> > </tr> > <tr> > <td>Pswd: </td> > <td ><input type="password" name="j_password" style="width: > 150px;"></td> > </tr> > <tr> > <td colspan="2" align="center"><input type="submit" > value="Login"></td> > </tr> > </table> > > > </form> > > <cfabort> > </cfif> > </cflogin> <div align="center"> > <cflocation url="admin/menu.cfm"></div> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5131 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
