Hi There,

My website is a search engine and on the home page it has the 'total number of searches performed: 123,456' - This is running simply by counting the total number of tags (it counts the entries in a MySQL table).

Is there any way of it automatically updating so while people are on the homepage they can see the number rising, without refreshing the page?

Recommended Answers

All 2 Replies

sounds like a job for Ajax.

Here Jquery Ajax plugin is geven:

http://jquery.offput.ca/every/

What you have to use is "everyTime" function.
One php page will return total number of search count.
everyTime function will be called in every second.
And based on php files output your number of count will be reflected on the user page.

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.