This is a simple real-time cookie, ajax, and mysl based chat application I made just for the fun of it. Do check it out!
So to get started just simply download all the files as they are. If you are running on an xammp server or even have a website set up all you need is a mysql database. So just set up your mysql database in phpmyadmin or how ever you wish so. Then create a table called messages that has an id, username, and message field. Then change the files are required. But that should hopefully work. Hit me up for any questions.