Flash Guestbook V2

Creating a guestbook in Flash using PHP script and a MySQL database

Setting up the database

You will need to have access to a server running PHP and MySQL. If you use another database, replace the MySQL database functions that I use in the PHP script with the database functions for the other database i.e. PostgresSQL, MSSQL.

First create two tables in the database:

# This table will hold the guestbook entries.
# Table structure for table `flashgb`
#

CREATE TABLE flashgb (
id int(4) NOT NULL auto_increment,
name varchar(20) NOT NULL default '',
email varchar(30) NOT NULL default '',
homepage varchar(50) NOT NULL default '',
comment text NOT NULL,
date datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (id)
) TYPE=MyISAM;

# This table will hold information on users allowed to access the guestbook administration
# Table structure for table `flashusers`
#

CREATE TABLE flashusers (
id tinyint(3) unsigned NOT NULL auto_increment,
username varchar(20) NOT NULL default '',
password varchar(20) NOT NULL default '',
email varchar(50) default NULL,
PRIMARY KEY (id),
UNIQUE KEY username (username)
) TYPE=MyISAM;

      Subscribe in a reader