Plugin Request: Second database connection or storing records w/ aMember username

Discussion in '3rd Party Service Providers' started by hilla, Jul 9, 2013.

  1. hilla

    hilla New Member

    Joined:
    Jun 11, 2013
    Messages:
    6
    I would like to be able to create a form with as many custom fields as I would like that will submit into a database. When the user is logged in and submits a record, the submission should attach their aMember name to the record and automatically populate the latitude and longitude fields in the database according to the zipcode entered (for later searching within a mile radius).

    All users should be able to search this database of information, and search through and edit records that THEY have submitted.

    Attached Files:

  2. thehpmc

    thehpmc aMember Pro Customer

    Joined:
    Aug 24, 2006
    Messages:
    901
    You don't really say how you are wanting this to work so one suggestion:

    Standalone outside of aMember.

    You have an aMember protected page containing the upload script. This will force member to log in to upload anything.

    Head of this php page contains the line suitably changed to get username of member
    require_once '/home/myusername/public_html/amember/library/Am/Lite.php';

    This page would then contain your uploading form with the necessary <input> tags including one hidden one which contains a call to 'Am_Lite::getInstance()->getUsername() '

    You now submit this form to, say, mydatabase.php which contains the routines to select your database and write your fields to it. It would also have the necessary code to translate the Zip code into Long. & Lat. (But to save two extra columns you could always do this translation when the database is read, unless of course you are wanting to search for this data as well.)


    You would also need an aMember protected page, to force member login, which contains the search box.
  3. hilla

    hilla New Member

    Joined:
    Jun 11, 2013
    Messages:
    6
    Thank you! This makes sense to me. I wasn't sure how easily I would be able to call the username and apply it to another database. I'll give this a shot.

    Is there a plugin out there that allows private messaging between members?


    Thanks again!

Share This Page