This is a tutorial on how to make an Ajax powered shoutbox. As because it is an Ajax powered, there are no iframe involve and the update of the shoutbox content is almost instant.
Skills Required
Basic knowledge of : Ajax, javascript, PHP, MySQL, html
First, you need to have a table in the database which store the shouter’s info and the shout content. The table consist of:
- An ID which acts as the primary key
- Shouter’s Name
- Shout Date/Time
- Shout Content
- Shouter’s Contact
copy and paste in the MySQL and run
CREATE TABLE `shoutbox` (
`id` int(5) NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`content` varchar(255) NOT NULL default '',
`link` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
);