Chat Room Design with PHP and MySQL

In this article, you will learn how to design and developlogin, message display, message input and a main
a simple online chat room with PHP and MySQL. Thisframe integrating the display and input sections. Thus, it
tutorial explains every steps of the development,needs the following four files to
including both database design and PHP programming.work:login.phpmain.phpdisplay.phpspeak.phpStep 3:
Basic computer skills and knowledge of HTML andWrite the code1. login.php (just a HTML form)
PHP are required. Ok, let's begin now.Step 1: Design
Database Table. Create table "chat" in MySQLUser LoginPlease input your nickname and enter
database to store basic chat information: chtime (chat2. main.php
time), nick (user nickname) and words (chat message,
less than 150 characters)My Chat Room
mysql> CREATE TABLE chat-> chtime3. display.phpThis file is used to get message records
DATATIME,-> nick CHAR (10) NOT NULL,-> wordsfrom database and display the results. To keep the
CHAR (150);Step 2: Design Structure. This simple onlinesize of database, old messages are deleted and only
chat room includes the following four sections: userthe newest 15 messages are displayed.