PHP shows newest comment from mysql without refreshing the page.
I want to reach a function like twitter. When people add a comment in my site anywhere. The newest in开发者_运维问答formation will display in one part of my home page. And upload the information without refresh the home page. I think it could be done by ajax, but I am a newbie, can anyone give me a live demo? or introduce me some plugin?
This is a good start for jquery: http://jqueryfordesigners.com/simple-jquery-spy-effect/
Then your ajax call will simply need to get the latest comments from your database. Probably by timestamp or datetime
There is a good example and study material for ajax
http://www.w3schools.com/Ajax/ajax_example.asp
精彩评论