Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2011
    Posts
    33
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Creating Privacy Options

    I have all but finished a private members' site and they have asked for a new feature to be 'thrown in.'

    When a member is logged in, they can go to a directory of members and search through it. The display shows the relevant results.

    What I need to be able to do now is in the area where the members update their profile, I need to give them an option of whether or not to allow other members to see their phone number, email address, etc.

    Each bit of info has to be controlled separately. ie yes show my email but not my phone. etc.

    I'd like to have a check box beside each option that essentially says select here if you would like to make this information available. And of course now the information when it is initially inputted to the database has to not show up until the user says 'yeh.'


    I'm not really sure how to go about this. I have a couple ideas but both seem ridiculous at the end of the day. Before I even start coding I need a better concept to start with.

    Anyone? Thanks so much!!!

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,538
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    Create some more columns in your MySQL table.
    Populate those columns with either a 0 (hide) or a 1 (show).

  • #3
    New Coder
    Join Date
    Jul 2011
    Posts
    33
    Thanks
    2
    Thanked 0 Times in 0 Posts
    One of my ideas I thought was a bit out there was adding a sort of salt to each field if they select to hide the content and check for that.

    So forest for the trees here I guess.

    Just create another column and have it initially set to hide (because it should hide unless they reveal it) Then set the check box to change that to show if they select it.

    Then when doing the search query do an if statement that basically says if the new column says show then show else don't.

    That simple... ?

    thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •