Home arrow MySQL arrow Page 6 - A MySQL Driven Chat Script
MYSQL

A MySQL Driven Chat Script


In this article, Tim will show you how to create a quick-n-easy chat script using PHP and a very simple MySQL database. The script will allow visitors to choose a nickname, enter text to send to the chatting window, and view messages from other people... all in real-time! For a bit of fun, the chat application also has buttons to send several emote-icons including smiling and frowning faces.

Author Info:
By: Tim Pabst
Rating: 4 stars4 stars4 stars4 stars4 stars / 280
December 25, 2001
TABLE OF CONTENTS:
  1. · A MySQL Driven Chat Script
  2. · Creating the database
  3. · The chat script explained
  4. · The chat script explained (contd.)
  5. · The chat script explained (contd.)
  6. · Conclusion

print this article
SEARCH DEVARTICLES

A MySQL Driven Chat Script - Conclusion
(Page 6 of 6 )

Creating and promoting visitor interaction on your site doesn’t have to take a lot of time or cost a lot of money! The chat script we have just created can act as a great base onto which you can build a complete web based chat application. Here are some ideas to improve the performance of our chat script:
  • Show a list of the people currently using the chat. Add a logout button, another frame, and another table to the database. When they login, add a record of their name to the new table. When they logout, remove their name from the table. Inside of the new frame, simply use a SELECT query to list all of the people currently using the chat script. Add a <meta> tag to the frame to make it refresh every 30 seconds.
  • Allow users to private message each other.
  • Add more icons-icons and allow visitors to send images as part of their message (just get the URL of the image from them).
  • Let the visitors create groups. Each group can contain more than one channel, which is an instance of a chat session.
  • Whenever a URL is typed into the text box (such as http://www.devarticles.com), make the top frame automatically display it as a hyperlink.
Also, be sure to take a look at some of the links below if you’re after more information on creating an online chatting application. If you want to get serious and learn more about PHP or MySQL, I would recommend the books shown below.

Until next time, I hope you enjoy playing around with the chat application. Remember you can download the SQL script, source code and images by clicking on the “supporting material” link below.
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
MYSQL ARTICLES

- MySQL and BLOBs
- Two Lessons in ASP and MySQL
- Lord Of The Strings Part 2
- Lord Of The Strings Part 1
- Importing Data into MySQL with Navicat
- Building a Sustainable Web Site
- Creating An Online Photo Album with PHP and ...
- Creating An Online Photo Album with PHP and ...
- PhpED 3.2 – More Features Than You Can Poke ...
- Creating An Online Photo Album with PHP and ...
- Creating An Online Photo Album with PHP and ...
- Security and Sessions in PHP
- Setup Your Personal Reminder System Using PHP
- Create a IP-Country Database Using PERL and ...
- Developing a Dynamic Document Search in PHP ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials