Private Pages (Need Advise)

Discussion in 'PHP' started by scottlpool2003, May 1, 2011.

  1. #1
    I'm creating a photography website and need a little advise.

    I've created a back-end to edit items such as:

    - Slider
    - Gallery
    - Upload Images

    The last thing to do which I left until last is a private gallery to allow individual users to view individual private galleries.

    I'm struggling to find a way to do this. Here's what I'm thinking:

    1. Allow admin to add user/password/images to the db
    2. Call the details out on a dynamic page
    3. Add the password to the page

    Is this the easiest way to do it or is there a simpler way to do it?

    Please help :)
     
    scottlpool2003, May 1, 2011 IP
  2. Projekt.Gopher

    Projekt.Gopher Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can just add a boolean value to the gallery DB entry that will tell you if it's private, then compare the gallery ownerID against the viewerID and parse accordingly
     
    Projekt.Gopher, May 3, 2011 IP
  3. careerfield

    careerfield Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It may take a little work but I would use a database to add edit and store users info with specific keys for each user. Then when you upload images you can have a specific users key identified with each user. Once they log in they will see all the pictures that are associated with themselves.

    I'm not sure what your background is with php, mysql, sessions etc. but if you have the time I think that would be my route.
     
    careerfield, May 6, 2011 IP