Sorry for my bad english!
How to make simple chat with php and ajax without creating mysql database?
Can you write code?
Thanks everyone!

8 Years
Discussion Span
Last Post by ivan3510

if u get the solution for this problem, please forward it for me too.

my email are [removed]

Edited by Ezzaral: Snipped email. Please keep it on site.


You don't need a DB to make a chat app, but it does help. One alternative would be to save new messages to a text file - not too nice.

Ajax chat apps are probably the easiest to create. You need to know some basic javascript and php/MySQL. jQuery is a good framework to use to avoid getting lost with the ajax object.


The page loads some js that tells the page to run a script every 5 seconds.
The script accesses a php script and gets data from the chat DB.
The js script then updates the chat 'window' with the data from the php script.

Quite simple really. Of course, you have to handle new posts (update DB) too.
Writing a GOOD chat script is considerably more difficult.

Edited by diafol: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.