password protect a page on my site

9 replies
  • WEB DESIGN
  • |
Hi
What is the best and most secure way to password protect a page? I would like everyone to have their own password so I can make sure they aren't sharing with friends.

The page is HTML.

Thanks
Rene
#page #password #protect #site
  • Profile picture of the author msforum01
    There are two main ways password protect is achieved

    Using scripting (Usually JavaScript but php and asp can be used)
    Using Server based password protection.
    {{ DiscussionBoard.errors[3156207].message }}
    • Profile picture of the author skynyrd9
      Well if your looking for the most secure way of password protecting the page you would use server side scripting and a database. The server side script would both serve the website to the user and validate the user. The database would be used to stores the users usernames and passwords.

      The code would basicly do this (not actaully code but and idea):

      if (user is logged in){
      show password protected content
      }
      else if (user is not logged in){
      show user a login form
      }
      {{ DiscussionBoard.errors[3157840].message }}
      • Profile picture of the author Renesoap
        It looks like I can't use server side because there is a conflict with the wordpress I am using. Is there a program that I can purchase that is as secure as server side? I here javascript etc is not that secure.
        Thanks
        Rene
        {{ DiscussionBoard.errors[3162185].message }}
  • Profile picture of the author SteveJohnson
    Unless you get complicated and try to come up with some kind of IP address comparison (which opens its own can of worms), there isn't really a way to ensure that someone isn't sharing passwords with their friends...
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[3159103].message }}
  • Profile picture of the author fazlerocks
    Take the help of PHP and MySQL. Check out some nice tutorials on web like w3schools or tizag.com if you are new to programming.

    Best Wishes!
    {{ DiscussionBoard.errors[3162460].message }}
  • Profile picture of the author leopi
    Ohm, this is wat i want to find. Thanks.
    {{ DiscussionBoard.errors[3162465].message }}
    • Profile picture of the author Jahnold
      If you're not able to do the scripting yourself then you might need to buy something like amember.

      It provides password protection and has account sharing detection built in. They will even install it on your site for you if you need.

      Not cheap though
      {{ DiscussionBoard.errors[3162671].message }}
      • Profile picture of the author Renesoap
        Thanks
        I own amember already, that is where the conflict is. The pages I want to protect are using html so there is a conflict with the wordpress on my site. It's okay. I created a new site that I will be using for the pages and I can use .htaccess.
        Thanks for all your help!
        Rene
        {{ DiscussionBoard.errors[3165324].message }}
        • Profile picture of the author victorben
          Through java script, you can easily solve your problem
          {{ DiscussionBoard.errors[3167112].message }}

Trending Topics