Displaying a member Product ID

Discussion in 'Templates customization' started by dereck_j2, Jun 13, 2007.

  1. dereck_j2

    dereck_j2 Member

    Joined:
    Aug 22, 2006
    Messages:
    42
    Hi all.

    I am trying to display a members Product ID, for the following code:

    If a member has a product ID of 1 display text, if product ID is not 1 then do not display text.

    PHP:
    if ($_SESSION['_amember_product_ids']['_amember_products']['product_id'] = 1)
    {
    <a href='staff_view.php' target='_self'>VIEW STAFF MEMBERS </a>
    PHP:
    }
    ?>
    If I echo the product_id it always displays "1" even when the member has a product_id of any other number.

    Thanks in advance for any help.

    Dereck
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    try
    if (in_array(1, $_SESSION['_amember_product_ids']))

Share This Page