[ALUG] Creating Customer Login facility on a website

Richard Lewis richardlewis at fastmail.co.uk
Wed Jul 11 13:59:15 BST 2007


On Wednesday 11 July 2007 13:35:11 sagr wrote:
> Our company has used email and ftp file transfers between itself and it's
> customers for quite some time.  However it is only in the last few days
> that I have started to create a simple website for it.  I have however got
> stuck with how to create a customer login page.
>
> Does anyone have any suggestions how to achieve this.
>
Will you be/are you implementing your web site as a dynamic site? i.e. using a 
server-side templating language like PHP, JSP, ASP or framework like Django 
or Turbogears to generate the site's content?

If so, then you'll find that most (all?) of these tools provide mechanisms to 
help you add authentication. They are based around maintaining server-side 
sessions (or server-side "cookies"). Generally, you present the user with a 
login page which, when submitted, checks his credentials against a database 
and, if they are valid, creates a new server-side session.

If not, then I would suggest that your consider it. In order to have any form 
of valid authentication will require some server-side complicity. You should 
have a look at the existing templating languages and frameworks and make a 
decision about which one you like best (they probably all allow server-side 
sessions so this will not be your key criteria).

> Our customer base is quite stable so setting up the individual login data
> entries in an ascii configuration file by hand would not worry me.
>
If you do this, I would suggest that you use a database rather than a flat 
file. Its actually just as easy (or maybe even easier) to access records from 
a database as from a file and it also means that you can store additional 
information about your customers useful to your application (e.g., in your 
case, the name of their private download directory) more easily.

Cheers,
Richard
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard Lewis
http://www.richard-lewis.me.uk/
JID: ironchicken at jabber.earth.li
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



More information about the main mailing list