Member Count > AMember PHP Include?

Discussion in 'Troubleshooting' started by dan_batten, Feb 21, 2013.

  1. dan_batten

    dan_batten New Member

    Joined:
    Dec 18, 2012
    Messages:
    3
    I found a really old post, but the config.inc.php file no longer exists in the directory in the post that explains how to pull member count from amember to be pasted into Wordpress.

    Please provide updated PHP code necessary to carry out this task.

    Thanks.
  2. dan_batten

    dan_batten New Member

    Joined:
    Dec 18, 2012
    Messages:
    3
    I also found another post that displays some info, but I'm not sure what info I was supposed to add to the code example to get working on my site.
  3. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Old posts will relate to V3, totally different to V4.
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Dan,
    Here is how you can display logged in user info in any php page
    http://www.amember.com/docs/API/Lite

    If you want to display user's count you can do it such way:
    PHP:
    include "/amember/bootstrap.php";
    $count Am_Di::getInstance()->db->selectCell("select count(*) from ?_user");
    print 
    $count;  

Share This Page