inaba Posted June 4, 2008 Share Posted June 4, 2008 hi all, I have created a forum of my own in php. Here when someone clicks on a threads i inceased a counter view in my database table.In this way, i track how many times a thread is viewed. The problem is now when a user clicks on the back button of the explorer window from other page and thus enters the page,it is also increasing the counter. Is there a solution to prevent increasing the counter when user enters the page by clicking back button of explorer window from other page. Plz help. Quote Link to comment https://forums.phpfreaks.com/topic/108655-clicking-back-button-of-ie-increasing-my-counter/ Share on other sites More sharing options...
Darklink Posted June 4, 2008 Share Posted June 4, 2008 Store their IP address or user ID and say "no, im not recording this!", otherwise record it. Or if you only want it temporarily not to record it, add a cookie telling the forum not to record it for that thread until later. Quote Link to comment https://forums.phpfreaks.com/topic/108655-clicking-back-button-of-ie-increasing-my-counter/#findComment-557235 Share on other sites More sharing options...
Zane Posted June 4, 2008 Share Posted June 4, 2008 are you using SESSIONs? if you aren't...then I strongly suggest it...seeing as it will solve your problem. read about sessions here http://www.tizag.com/phpT/phpsessions.php Quote Link to comment https://forums.phpfreaks.com/topic/108655-clicking-back-button-of-ie-increasing-my-counter/#findComment-557240 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.