New to making websites - how do I password protect a part of my site??

I'm very new to website creation and am making a website where I want some pages to only be accessible to certain people.

I want each person to have a unique password and username which they enter into the login page. Then they are taken to a personal page where they can access the necessary info setup for that person.

I have made a page (using a drag & drop website program) with a couple of username & password entry boxes and a 'login' button.

I would like to know how I can get this to work. How do I get the website to check the entered username & password against the correct one and then to take the user to their page?

Many thanks!
"To be ignorant of one's ignorance is the malady of the ignorant." Amos Bronson Alcott

Comments

  • sra
    sra Posts: 4,676 Forumite
    Part of the Furniture 1,000 Posts Combo Breaker Photogenic
    I'm very new to website creation and am making a website where I want some pages to only be accessible to certain people.

    I want each person to have a unique password and username which they enter into the login page. Then they are taken to a personal page where they can access the necessary info setup for that person.

    I have made a page (using a drag & drop website program) with a couple of username & password entry boxes and a 'login' button.

    I would like to know how I can get this to work. How do I get the website to check the entered username & password against the correct one and then to take the user to their page?

    Many thanks!

    I'm just looking around 100webspace for the first time

    It has a really simple system. You just tell it what directory you want protected and what the usernames, passwords will be:

    http://hostingrapid.com/tutorials/supremeserver_tutorial_12_creating_managing_password_protected_areas_ppas.htm
  • wolfman
    wolfman Posts: 3,225 Forumite
    Depends what language you're writing the website in. It'll vary. For example in .Net you can specify which directories to allow access to in the web config file, and the server will error on any unauthenticated requests.

    Or a simple way of looking at it, upon logging in you set some sort of session variable. If ever this variable is null when the user requests a page, then you redirect them back to the login page.
    "Boonowa tweepi, ha, ha."
  • blinky
    blinky Posts: 1,684 Forumite
    Part of the Furniture Combo Breaker
    Useful tool for making .htaccess and .htpassword files for Linux / Unix / BSD hosted sites.

    http://www.clockwatchers.com/htaccess_tool.html
    Hug provider for depression thread :grouphug:
    "I'm not crazy, I'm just a little unwell.." - Unwell by Matchbox Twenty
  • tigermatt
    tigermatt Posts: 1,926 Forumite
    1,000 Posts Combo Breaker
    You can either use a web hosting company as previously suggested (easiest option) or you can use a JavaScript script. The Javascript option isn't as secure as the others though.

    If you are coding scripts in a scripting language such as ASP/PHP, you could write a file that talks to a database and confirms whether a user has permission to login etc. :)
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.4K Banking & Borrowing
  • 252.9K Reduce Debt & Boost Income
  • 453.3K Spending & Discounts
  • 243.3K Work, Benefits & Business
  • 597.9K Mortgages, Homes & Bills
  • 176.6K Life & Family
  • 256.4K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.