Hi Guys, I have a collection of links, Now i want to know the most viewed or clicked link. Could you please help me finding the code or in writing the code? Thank you in Advance Smart
It all depends on how you log the users access to the pages. For example some CMS software increment the view count everytime a user reads a certain article, or just like a forum increments the views on a topic when it's read. Alot of time in such software it is stored in the database. Once you find where that information is stored (if it is stored) then we can probably help you more with how you can write the code.
I have stored the URL's in a Database, Whenever a user clicks that count should increment. How can i do that?
Use a simple SQL query such as: UPDATE site_links SET link_hits = link_hits + 1 WHERE link_id = {insert link id here} LIMIT 1 Code (markup):