Login tables: installation & configuration

Author: Günter Schenk, Added: 16.12.2007, Updated: 09.01.2008


Table Of Contents

Title Version
Installing the database tables n/a
Configuring the Login settings n/a


print this page... 1. Installing the database tables


1.1. Introduction

One of the most frequently asked questions by Dreamweaver Developer Toolbox newbies on the ADDT forums is :: what the heck is the required structure of ADDT´s login tables supposed to be like, and how do I set this thing up ? Regretfully the current ADDT helpfile does leave folks in the dark about this, so here´s a complete SQL dump for you to use with your favorite database management tool like e.g. phpMyAdmin:

CREATE TABLE `login` (
`id` int(3) unsigned NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`password` varchar(70) NOT NULL default '',
`email` varchar(150) NOT NULL default '',
`active` tinyint(4) NOT NULL default '1',
`level` int(2) NOT NULL default '0',
`random_key` varchar(200) default NULL,
`login_attempts` smallint(6) NOT NULL default '0',
`disable_date` datetime NOT NULL default '0000-00-00 00:00:00',
`registration_date` datetime NOT NULL default '0000-00-00 00:00:00',
`expiration` int(11) NOT NULL default '100',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;


CREATE TABLE `login_stats` (
`id` int(11) NOT NULL auto_increment,
`id_log` int(11) NOT NULL default '0',
`ip_log` varchar(15) NOT NULL default '',
`last_logindate_log` datetime NOT NULL default '0000-00-00 00:00:00',
`last_activitydate_log` datetime default NULL,
`session_log` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;


As you might note, the abovementioned columns have on purpose been widely named according to the various dropdown menus available from within ADDT´s Login Settings (see "Control Panel") -- this should enable you to instantly assign the corresponding table columns without having to wonder what belongs where ;-)

1.2. some notes on the provided SQL script:


1.3. Installing the tables with phpMyAdmin

Any halfways feasible database administration tool installed on your local or remote server should provide an "insert SQL data" feature -- the following example is based on the popular the next link leads to an external website phpMyAdmin that´s usually available on ordinary PHP/Apache hosts

a) open phpMyAdmin and click the SQL icon usually located on top of the left frame:

phpMyAdmin: the insert SQL button

b) the subsequently opened browser window will display a blank textarea awaiting some input. Just paste the provided SQL dump in here...

phpMyAdmin: the insert SQL textarea

... and confirm with OK to get the tables installed. That´s all there is to do, phpMyAdmin´s list of installed tables will now refresh and display the newly installed login tables.



jump to page top...


print this page... 2. Configuring the Login settings


Now that the login tables have been added to your database, it´s time to to configure ADDT´s Login settings:

a) open ADDT´s Control Panel

b) click the "Login settings" button

c) click the "Database" tab and specify the "database information" as displayed next:

Dreamweaver Developer Toolbox: Login settings: Database tab

d) PHP_MYSQL server model only: click the "Restrictions" tab and specify the "login policy" and "account expiration settings" as displayed next:

Dreamweaver Developer Toolbox: Login settings: Restrictions tab

e) PHP_MYSQL server model only: click the "History" tab and specify the "user history options" as displayed next:

Dreamweaver Developer Toolbox: Login settings: History tab

jump to page top...


Copyright Note:
This tutorial and all related material (files, images etc) are licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Contact:
info @ guenter-schenk.com