State field in amember database

Discussion in 'Customization & add-ons' started by bubbasorg, Jul 11, 2005.

  1. bubbasorg

    bubbasorg New Member

    Joined:
    Jun 13, 2005
    Messages:
    5
    is it possible to have the entire state name (eg: Alabama) stored in the database instead of the 2 letter abbreviation (AL)? when a user uses the registration form, the drop-down menu that contains all of the states lists them with their full state name, but the state is then stored in the database with the 2 letter abbreviation.

    if so, how do i go about making that happen?

    thanks in advance!
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Everything is possible, but it would be better to describe WHY you need this. Then we could offer better help.
  3. bubbasorg

    bubbasorg New Member

    Joined:
    Jun 13, 2005
    Messages:
    5
    well, i have a drop-down menu on another page that references that table in the database and i would like it to display the full state names in the drop down menu instead of the 2 letter abbreviation for the states. thanks!
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    you can add this translation into your PHP code. Array of correspondence between short and long state names located in bottom of amember/common.inc.php file.
  5. bubbasorg

    bubbasorg New Member

    Joined:
    Jun 13, 2005
    Messages:
    5
    ok, so in the common.inc.php file, do i change this line (for example):

    "AL" => "Alabama",

    to this:

    "Alabama" => "Alabama",

    is that it? do i need to change anything in the database table?
  6. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    No, it is better to edit YOUR PHP code that displays dropdown. If you paste your code, I could help.
  7. future

    future New Member

    Joined:
    Jun 20, 2010
    Messages:
    8
    Hi Alex
    Is there a way to fix it in amember v4 ? I have (Australian) states with a prefix "AU-" which I need to get rid of. The reason we need AU- removed is that we use aMember's database for sending magazines to subscribers, and removing AU- after db export is one less step we would like to live without.
  8. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    No unfortunately it can't be removed.

Share This Page