3 Replies Latest reply on Aug 11, 2008 12:58 PM by (shane_mosier)

    Create SESSIONS

      Hi All,

      Can someone help me with this as going mad trying to understand why this is not working.

      $_SESSION["EVID"] = $_rsEvents["id_Event"];

      $id_Event = $_SESSION["EVID"];


      This is to pass to a form through a link so that the form can not be selected from the URL param.

      But all I get is

      Notice: Undefined variable: _rsEvents in C:\Apache2\htdocs\events\create_event\update\index.php on line 5

      so the index.php have the SESSION and I need to pass this to the update.php page where the form is located.

        • 1. Re: Create SESSIONS
          Günter Schenk Level 4
          Hi Joe,


          not sure, but the underscore may be too much -- if that´s suppposed to be a variable coming from a Dynamic List, the standard syntax would be:


          Günter Schenk
          Adobe Comunity Expert, Dreamweaver
          • 2. Re: Create SESSIONS
            Joseph07888 Level 1
            Hi Gunter,

            I am still getting the same error

            Notice: Undefined variable: row_rsEvents in C:\Apache2\htdocs\newmember\members\events\create_event\update\index.php on line 6

            $_SESSION["EVID"] = $row_rsEvents['id_Event'];

            $id_Event = $_SESSION['EVID'];

            I feel there is something I am missing.

            Yes the session comes from a recordset names rsEvents with the field id_Event.

            To test that it is there i pulled it from bindings and checked the code and also from session vars where i have setup the VARI of EVID.

            I am tring to secure a form by passing the EVID vari via the webpage when a link is clicked to update that event.

            Link to the other question: http://www.adobeforums.com/webx/.59b61f0f/1

            • 3. Re: Create SESSIONS
              Level 1

              I'm not sure how you can call $row_rsEvents['id_Event'] on line 5or 6 of your page.

              $row_rsEvents is a Recordset variable and would not normally come into scope until the database has been queried and the row has been called in.

              So if you are calling the variable before you call $row_rsEvents = mysql_fetch_assoc($rsEvents)

              then there is no value set. You can't call $row_rsEvents from a previous page. This type of variable does not pass from page to page.

              You have to first have the recordset code and then set $_SESSION["EVID"] = $row_rsEvents['id_Event'];