Any tips on how to create a login form?

  livewire 18:23 13 Mar 2005


Does anyone have any tips or suggestions on how to create a log-on box which is linked to a database record of users to log them into the site and then view the secured page?

Any help would be most welcomed!

PS: Im using FrontPage 2002 as my Web Design program and have already established the database link and a form where users can submit data. I now need to secure that page...

  CodeMeister 18:39 13 Mar 2005

Hi LiveWire

It would help if you had told us which server side language you are using i.e. Clasic ASP, ASP.Net, C#, PHP, Cold Fusion to help us to give you an answer specific to your scenario.

The basic principle is as follows :-

<form method="post" action="receiver.asp">

<script language="javascript">

function validate(){

//Validation code goes here.



<input type="text" name="txtUsername"/>

<input type="text" name="txtPassword"/>

<input type="button" value="click" onclick="validate();">



Dim Username
Dim Password
Dim oADOCmd
Dim oADOConn

Username = Request.Form("txtUsername")
Password = Request.Form("txtPassword")

Set oADOCmd = Server.CreateObject("ADODB.Command")

Set oADOConn = Server.CreateObject("ADODB.Connection")

Add code here to compare the values entered by the user with those within your database table.

This could either be done using output parameters or recordsets although recordsets are a bit "old hat" these days.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

AMD Radeon Adrenalin release date, new features, compatible graphics cards

8 brilliant character artists speaking at Pictoplasma 2018

iMac Pro release date, UK price & specs

Football : comment regarder la Ligue 1 en direct ?