2 Replies Latest reply: Apr 13, 2012 3:27 AM by Wookie RSS

    Show / Hide content based on access levels (php)

    Wookie

      I have a region of a web page that is visible only to logged in users with the access level 'level1' - I want to amend this code and add a second user access level 'level2'.

       

      So basically I want users with access 'level1' and 'level2' to see 'X' content.

       

      Here's the code....

       

      <?php if (isset($_SESSION['MM_UserGroup']) && $_SESSION['MM_UserGroup']=='level1'){ ?>

       

      'content here'

       

      <?php } ?>

       

       

      I tried amending the code to the following but without luck:

       

      <?php if (isset($_SESSION['MM_UserGroup']) && $_SESSION['MM_UserGroup']=='level1,level2'){ ?>

       

       

      Any help would be appreciated!