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

Recommended Answers

All 7 Replies

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

my email are [removed]

Try this attachment.
There are many scripts available. Try to search.

without db I guess its a lot of problem...

OK. Then:
How to make a simple chat with mysql db?

thanks chitan for chat example.
i hope it will useful for beginners.

Member Avatar for diafol

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.

Example:

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.

Thank you very much!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.