0 Replies Latest reply on Sep 29, 2008 1:59 PM by (Adam_J_Drake)

    Dynamic $mxiObj->IncludeStatic

      Hi all! This is my first post and I'm very new to PHP, so bear with me here...

      I'm using ADDT's Include Multiple Static Pages function to call in different contents from a mySQL DB. Here's the logic:

      index.php?id=whatever

      I need to grab "whatever" from the URL, then plug it into the $mxiObj->IncludeStatic section to call up the right contents. I want to do this dynamically, rather than listing out all the possible array choices, so that I do not have to rewrite this bit every time I add a record to the DB.

      I thought this would do the trick:

      $mxiObj = new MXI_Includes("id");
      $mxiObj->IncludeStatic("", "inc_index.php");
      $mxiObj->IncludeStatic($_GET[id], $_GET[id]."/inc_index.php");

      My hope was that something like "index.php?id=5" would result in the included file to be "5/inc_index.php"

      I've gotten the value of "id" to echo on the page, but can't seem to nail the syntax to get it to work in the $mxiObj script.

      Help please??