Database Setup
Advanced Form Handling database is only included for use in
the Professional Version. It is supplied with the Basic
version only to the extent of being able to test read and
write facilities and to verify that databases are supported in
your server environment.
Setting up your database
The Pro version of Advanced Form Handler can use a database
to store the response and allow you to view, edit and
otherwise manipulate the responses. Advanced Form Handler uses
an ASP file called config_database.asp to tell Advanced Form
Handling three
things:
- Name of your database
- Location of the
database
- Type of database.
Advanced Form Handling supports three types
of databases. Access database which is supplied and called
afh100.mdb. SQL Server database and a MYSQL database.
Database Configuration
Edit file config_database.asp with a plain text editor
such as notepad and change the values depending on the
database you are planning to use.
Setting up Access
Database An Access database is the simplest type of
database to use but it is recommended only for small volumes.
Sample settings in config_database.asp
| config_databasename="afh200.mdb" |
This is the name of the
database. It is supplied as afh100.mdb but it can be
called anything you choose. |
| config_databaseType="Access" |
The type of database. Use
"Access" for any Access database. |
| config_databaselocation="c:\mywebserverfolder" |
This is the location where
the database is located. Most web hosting companies will
provide a separate folder. Place afh100.mdb into that
folder and put the path to the folder. |
Database Security
The database will hold information from
your form responses and possibly sensitive data. Please make
sure that the database file cannot be downloaded from your
browser.
It is just a plain file to the browser. Most
web hosting companies will provide a separate folder for the
database. Please place the Access database into that folder and change
the database location value in the config_database.asp file.
Setting up SQL Server Database - Step 1 SQL Server
database is Microsoft's high volume database server. The
set-up for SQL Server involves three steps. First contact your
web hosting company and verify that you can use SQL Server and
get the following details: SQL Server database name
SQL Server Server Name such as xxxhost.com
SQL Server userid
SQL Server Password
Edit file config_database.asp and put those values
| config_databasename="nameofdatabase" |
This is the name of the
database. Your web host will provide this. |
| config_databaseType="SqlServer" |
The type of database. Use
"SQLServer" for any Sql Server database. |
| config_databaseuserid="uuuu" |
The userid allows to
read/write this database. |
| config_databasepassword="ppppp" |
Password |
| config_databaseserver="xxxhost.com" |
The location of the actual
SQL Server. This is provided by web host. |
Setting up SQL Server Database - Step 2 The next
step is to have Advanced Form Handler actually create the
necessary tables in your database. From your browser start the
utility createdatabasetables.asp. It will build the necessary
tables in your SQL Server Database. Type in file name: createafhsqltables.txt Setting up SQL Server Database - Step
3 The next is to load the tables with default
information such as a default userid and password. From your browser start the
utility createdatabasetables.asp. It will build the necessary
tables in your SQL Server Database. Type in file name:
createafhinserts.txt Setting up SQL Server Database - Step
4 When completed delete files create... from your server
to prevent hackers from using them
Setting up MYSQL
Database - Step 1 MYSQL Server database is database
supplied by some web hosting companies. The set-up for MYSQL
involves three steps. First contact your web hosting company
and verify that you can use SQL Server and get the following
details: MYSQL database name
MYSQL Server Name such as xxxhost.com
MYSQL userid
MYSQL Password
Edit file config_database.asp and put those values
| config_databasename="nameofdatabase"
|
This is the name of the
database. Your web host will provide this. Some web
hosts provide tools to create the MYSQL database. In
that case you can select your own name |
| config_databaseType="MYSQL"
|
The type of database. Use
"MYSQL" for any MYSQL database. |
| config_databaseuserid="uuuu"
|
The userid allows to
read/write this database. |
| config_databasepassword="ppppp" |
Password |
| config_databaseserver="xxxhost.com" |
The location of the actual
MYSQL Server. This is provided by web host. In many
casess it is "Localhost" |
Setting up MYSQL Database - Step 2 The next
step is to have Advanced Form Handler actually create the
necessary tables in your database. From your browser start the
utility createdatabasetables.asp. It will build the necessary
tables in your SQL Server Database. Type in file name: createafhmysqltables.txt Setting up
MYSQL Server Database - Step 3 The next is to load the
tables with default information such as a default userid and
password. From your browser start the
utility createdatabasetables.asp. It will build the necessary
tables in your SQL Server Database. Type in file name: createafhinserts.txt Setting up
MYSQL Server Database - Step 4 When
completed delete files create... from your server to prevent
hackers from using them
Database Administration
After configuring your database, you can
login to the administration.
To login to the database administration use file: af hlogon.asp
The Userid is admin
The Password is admin
Change
the admin userid as soon as possible since these are well
known values and leave your site open to hackers.
Database on your own PC
Advanced form handling can be used on your own PC. For SQL Server you must have your own copy of Microsoft SQL Server installed and for MYSQL you must
dow nload
www.mysql.com.
For an article on MYSQL under Windows see
http://www.iis-resources.com/modules/AMS/article.php?storyid=18
The correct Microsoft database permissions need to be
set for you to be able to write Access database.
|