Log In System: DWMX 2004
From soup to nuts: get all the steps for creating an authentication system in Dreamweaver MX 2004 using its new PHP server behaviors. We start at the beginning—the database.
Note: this tutorial assumes that you have already set up your computer to use PHP, MySQL, and phpMyAdmin. If you need help with configuring your Mac, work through my set up tutorial. If you need help in installing and creating databases in phpMyAdmin, work through my phpMyAdmin tutorial. If you need help in learning to create forms, try my GoLive form tutorial. It can easily be adapted to Dreamweaver.
Create the database in phpMyAdmin
First we will need to have a database in order to store and add user information. Let's create that now. Keep it simple for your first authentication system. (Later, you can create more complicated systems with user email addresses, AOL Instant Messenger screen names, and other information.)
- Go to your browser and open phpMyAdmin
- Create a new database called login_system
- Create a new table in this database called system_users
- Create the following 6 fields
userID (primary key and auto_increment) int 11 digits - username with a VARCHAR of 20
- password with a VARCHAR of 10
- firstname with a VARCHAR of 30
- lastname with a VARCHAR of 30
- userGroup with a VARCHAR of 20
Now click on the insert tab of phpMyAdmin and enter a record for yourself. Give yourself a userGroup value of admin. Be sure to leave the userID blank. The database system will automatically assign that. Also be sure to write down your username and password.
Next we need to define the site in Dreamweaver-->