Restricting pages to people in database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Dennis McGrath
    Private

    • Jul 2010
    • 2

    Restricting pages to people in database

    Hi all,

    First time poster so here goes.
    2 questions:



    1. I want to have a form where people can;
    • Register (email & name) - a reply email from administrator supplies password though I may wish to manually allow login after vetting.
    • login / logout
    • retreive password if lost
    • all data sitting in a database (I use Blue Voda & Vodahost)
    2. I have completed the above part BUT want to have 'Member only" pages visible only after the user has logged in successfully. Failure to successfully login will result in the user being redirected back to the login page or another page of my choice.

    How do merge the two together?

    Now I know how to protect pages individually or a folder where I can publish other pages but this is all very manual and time consuming.
    I have combed this forum though not thoroughly as I'm sure this question has probably been answered already. I am a relative newbee to web design but I know what I like in a website and being a IT Consultant would like to think I can pick this up fairly quickly if I put in the time.

    Some direction in this matter would be much appreciated.
    I should also add that I intend to offer web design to my current clients so I want to start off with best practices and limit the time I spend building a website. If this is a script/process that's difficult or impractical then I am open to paid scripts though I think what I ask is fairly straight forward. No Paypal or ecommerce in the immediate future.


    Here are a couple of sites I have built just so you know where I'm at skill wise, be it good, bad or no comment...
    www.boaterstoastmasters.org.nz
    www.ufcomputing.com

    Apologies as I have digressed.
    In summary how do I restrict page access to only those people who have registered and logged in?


    Thanks in advance
  • Dennis McGrath
    Private

    • Jul 2010
    • 2

    #2
    Re: Restricting pages to people in database

    Sorry folks, I overlooked the need to add the "Password Protect Page" object in each page I wanted to protect.
    Reading through navaldesign's threads answered this question.

    Thanks anyway

    Comment

    • linceman
      Master Sergeant

      • Jul 2010
      • 60

      #3
      Re: Restricting pages to people in database

      Hey Dennis
      Could you send me the links to navaldesign about the page protection...

      I'm looking for something similar to what you were looking for...

      I want people to register on my site and then I want to restrict certain pages to registered users... so that whenever a restricted page is accessed they have to fill in the user name and key to get in...

      Or if you know how to do it I'd appreciate..

      thx b4hand
      linceman

      Comment

      • Dennismc
        Private

        • Jul 2008
        • 4

        #4
        Re: Restricting pages to people in database

        Hi linceman,

        I suggest you follow this link by navaldesign. If you follow all the steps then it should work fine.
        Also any destination pages you enter in the signup, login or change password forms only require the url "members.php", or login.php etc. (not www.blabla.com/members.php) This caught me out initially.
        When making the Signup Form you will need the do the following. Under AdminAccountActivation make sure you set this to True. This allows you to activate the account manually if this is what you wish. Otherwise people can register and access these pages immediately.
        Oh one other thing, you can't have 2 or more forms on the same page eg "Login" and "Password Recovery" You need to place a hyperlink to the other page instead.
        I hope this makes sense. I'm happy to go into more detail if you get stuck.

        Good luck

        Comment

        • cthemarketer
          Corporal

          • Jul 2008
          • 10

          #5
          Re: Restricting pages to people in database

          I have gone through through navel's tutorial in extreme detail. Everything works pretty good but I'm having trouble with the database showing on the page.

          I put the admin icon on the page and the page just shows up with a square with no info in it.

          If I just type the url of the database I made, I can see the info of the members but I cannot edit any of the info there.

          I tried listing in the properties of the table as a .php .html and nothing after the name and nothing seems to work.

          Any advice

          Comment

          Working...
          X