Re: "members only" section - user names and passwords

by "Michael Gerholdt" <gerholdt(at)fredonia.edu>

 Date:  Sat, 25 Aug 2001 09:35:49 -0400
 To:  <denise(at)amun-ra.demon.co.uk>,
<hwg-techniques(at)hwg.org>
 References:  localhost
  todo: View Thread, Original
Denise,

You need to store information somewhere, first of all. You must have a way
to access that information and compare it to user input.

At minimum, a username/password pair could be tested just to see if the pair
exists. If yes, then proceed, if no, then redirect to a 'Sorry' page or
something.

So information must be stored somewhere - that is, in a datastore of some
kind. This could be a relational database, an Excel spreadsheet, or a flat
file (comma-separated or XML).

For something as simple as you indicate, I'd suggest using an XML file, for
a couple of reasons.

1) You have some learning to do here anyway regardless what technology you
use. Might as well take the opportunity to get into this important area.
This would be a very easy and practical introduction to XML.

2) XML is just a text file - doesn't require a database engine. Less
overhead, faster, modify it with Notepad if you want. Hosts won't be
charging you for accessing an XML file the way they do for using mySQL or
another relational database. And it is extremely  portable.

In addition to this you also need a way to do some server-side scripting to
create a query that can handle the user input and bang it against  your
datastore. What tools you use here would depend on your platform and web
server: ASP, PHP, perl/cgi, CF, etc. This is the case regardless what sort
of datastore you decide to use.

A relational database can be more robust and secure than an XML file, but
for your described needs, I think you don't need all that at this point.

hth
pmg


> Hello
>
> Most of the HTML I have done has been static, but for the particular
> project I've been working on, there are a number of documents
> which aren't exactly confidential, but would do with being in a
> "members only" area.
>
> What I would like to have are boxes to enter user name and
> password before someone can get to this part of the site.
>
> Can someone point me in the right direction on how I go about this?
>
> Thanks
>
> Denise Davies
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA