Setting a mySQL table depending on product

Discussion in 'Integration' started by vantagestudios, Jun 20, 2007.

  1. vantagestudios

    vantagestudios New Member

    Joined:
    Jun 19, 2007
    Messages:
    9
    Hey,

    We are creating a website that allows people to setup onlines shops an such.

    We are using aMember pro just to handle membership payments and logins/user data.

    Is there a way to give the user a product number depending on which membership they sign up to.

    ie.

    mySQL table

    username: john
    membership: 1

    username: jane
    membership: 3

    The reason i am asking is because each membership has different options, so i am hoping to be able to grab the membership number for an if statement to include all the options.

    Thanks!
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You always can do this in if statement.
    Here is example in php:
    PHP:
    if(array_intersect($_SESSION[_amember_product_ids],array(1,2,3))){
    // User have product 1 or 2 or 3 
    }

Share This Page