Home arrow PHP arrow Chatter


This tutorial shows you how to make a ChatterBlock. ChatterBlocks are small windows where users can type in messages. They're also called Shout Boxes or TagBoards and are kind of like miniature chat rooms.

  1. Chatter
  2. Configuration
  3. View Chatter
  4. Manage the Chatter
  5. Secure it
By: Roger Stringer
Rating: starstarstarstarstar / 29
November 08, 2004

print this article



Chatter Form

Let's make the chatter form first. Open Notepad or your editor, cut and paste the following HTML code and save this file as chatter.html .

<iframe src='view.php' border='0' name='chatterblock' width="120" height="180" frameborder="0" framespacing="0"></iframe><br>
<form action='post.php' method='post' target='chatterblock'>
<input type='text' name='name' value='name'><br>
<input type='text' name='url' value='http://'><br>
<input type='text' name='msg' value='message' maxlength="100"><br>
<input type='submit' value='Talk'>

The code above creates an iframe code, and a small form for users to enter their name, url and messages. This will also be the code that you can cut and paste into part of your navigation.

This code can be inserted into your own Web pages as well. We use the same code here at QuickPipe for our ChatterBlock.

The Database

Before we go any further, we must create the database schema for MySQL for the ChatterBlock entries. Cut and paste the following code into MySQL either via Telnet, PhpmyAdmin or any other means of communicating with MySQL.

CREATE TABLE chatterblock(
id INT (4) not null AUTO_INCREMENT,
name VARCHAR (32),
msg VARCHAR (100),
url VARCHAR (32) ,
entered DATETIME,
ip varchar(16),

CREATE TABLE blocked_ips(
id INT (4) not null AUTO_INCREMENT,
ip varchar(16),

CREATE TABLE blocked_nicks(
id INT (4) not null AUTO_INCREMENT,
name varchar(32),

As we start off, the msg variable in the 'chatterblock' table only allows 100 characters. If you find your chatterblock too limiting, you can increase the number of characters in the schema. Don't forget to update the HTML code and set maxlength to your new limit.

>>> More PHP Articles          >>> More By Roger Stringer

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: