Custom PHP Scripts / AM_lite

Discussion in 'aMember Pro v.4' started by bgtheory, Mar 13, 2013.

  1. bgtheory

    bgtheory New Member

    Joined:
    Jan 22, 2010
    Messages:
    15
    I have a custom php call that works great in V3 based on product ids, but in the process of migrating to V4. Here is how it is set-up in V3 (obviously "mysite" is generic):


    <?php session_start(); $user = $_SESSION['_amember_user']; if ($user['member_id'] > 0){
    session_start(); $need_one_from = array(2,3,4,6,7,8);
    if (array_intersect($need_one_from, $_SESSION['_amember_product_ids'])){
    include("/home/mysite/public_html/mysite/php/subheaderpremium.php") ;
    }
    else {
    include("/home/mysite/public_html/mysite/php/subheaderfree.php");
    }}
    else {
    include("/home/mysite/public_html/mysite/php/subheader.php");
    }
    ?>

    I have tried calling the am_lite library and using the PAID and FREE constants, per the documentation in the manual at http://www.amember.com/docs/Content/PHPScripts but it just returns header errors. I am sort of at a loss here, any help is appreciated...
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    What code have you tried exactly? And what errors were received?

Share This Page