1 Reply Latest reply on Jun 22, 2009 7:31 AM by Dan Bracuk

    Application variable help please!

    shujaatsyed7 Level 1

      Hello folks!

       

      I am trying to use a application variable which is taking a input from a Login.cfm and passing to Auth.cfm . I am not able to use this application.WebPDMReports in Auth.cfm page and not sure what in heavens I am doing wrong please if you can look into my code.

       

      Assuming WebPDMReports and USERID are defined in application.cfm.

       

       

      Login.cfm

       

      <cfparam name="WebPDMReports" default="">


        <cflock timeout=20 scope="Application" type="Exclusive">
           <cfset WebPDMReports="#cflogin.name#">

        </cflock>


      <cflocation addtoken="no" url="../Auth.cfm">

       

       

      Auth.cfm

       

      <CFOUTPUT>

       

      <CFLOCK SCOPE="session" TIMEOUT="30" TYPE="Exclusive">

        <CFSET session.USERID=#application.WebPDMReports#>  (If my session.USERID =loginuser then allows users to use index.cfm)
           
      </CFLOCK>


      </CFOUTPUT>

       

      Please some one help me , I have wasted so much time just to make it work!!