A small webchat using JavaScript, PHP and MySQL

During my studies, I had some lectures about Ajax driven web-services in the second or third semester and I thought, that I can build something like that on my own. So I started this little chat project and gave it a try.

Used technologies:
JavaScript (for Ajax action), PHP and MySQL, HTML and CSS
(Thats also where the name comes from – AMPChat – AjaxMysqlPhpChat)

The working mechanism is the following (simplified):
A JavaScript function polls a PHP script, telling it which chatmessages it already knows. The PHP script checks, whether there are new chatmessages stored in the database or not and sends its response – an XML with either no records (if no new messages are around) or one with the missing chatmessages. The JavaScript then writes the new messages in a DIV element of a website.

The chat is available under the following link:
https://looke.ch/amp
user: guest
password: 123123

The whole thing is open-source. You can find the code here: https://looke.ch/amp/source.php