global $member_id;

Discussion in 'Customization & add-ons' started by draj, Jan 10, 2007.

  1. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
  2. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hello!

    Well, the $members_id was not available in this function load_countries_config () { of common.inc.php!

    So instead of doing other things, I found it in the following and it works correct:

    if (strlen($_SESSION['_amember_user']['login'])){
    $member_id = intval($_SESSION['_amember_user']['member_id']);
    }

    Moreover, this could be actually used for logged-in users in any function if not available, I beleive.

    Now it loads the states and cities based on the users choice of countries, which is a much better solution than capturing the data of countries and states from the binary fields.

Share This Page