Sessions with custom PHP code

Discussion in 'Integration' started by smdstudios, Apr 16, 2010.

  1. smdstudios

    smdstudios New Member

    Joined:
    Oct 20, 2006
    Messages:
    11
    I have some custom pages that I am trying to have a specific message show based on membership and the code that I have tried to piece together is not working. Can anyone help out?

    PHP:
    <?php session_start(); ?>
    <?php
      
    if ($_SESSION['_amember_product_ids'] ==1) {
      print 
    "<a href='LINK TO MOVIE'>Watch Movie IMAGE</a>";
      } elseif (
    $_SESSION['_amember_product_ids'] ==2){
      print 
    "<a href='/member/member.php'>Movie for VIP Members Notice</a>";
      } else {
      print 
    "<a href='/vsm/Sign_In.html'>Sign In</a>";
    }
    ?>
  2. smdstudios

    smdstudios New Member

    Joined:
    Oct 20, 2006
    Messages:
    11
    any help here?
  3. jenolan

    jenolan aMember Coder

    Joined:
    Nov 3, 2006
    Messages:
    510
    Code:
    <?php session_start(); ?>
    <?php
      if ( count($_SESSION['_amember_product_ids']) ==1) {
      print "<a href='LINK TO MOVIE'>Watch Movie IMAGE</a>";
      } elseif ( count($_SESSION['_amember_product_ids']) ==2){
      print "<a href='/member/member.php'>Movie for VIP Members Notice</a>";
      } else {
      print "<a href='/vsm/Sign_In.html'>Sign In</a>";
    }?> 

Share This Page