angel1987 Posted October 18, 2010 Share Posted October 18, 2010 Hello, I am trying to create article directory for learning PHP MySql and i want to write a script for recording number of views for an article and store it in Database. Can anyone please direct me to a nice simple tutorial or help me with the steps or algorithm? Suppose the link for an article is http://www.domain.com/article.php?id=123 Do i need to put extra variables and create a tracking PHP file for it? Link to comment https://forums.phpfreaks.com/topic/216150-how-to-count-number-of-article-views-in-php-mysql/ Share on other sites More sharing options...
BlueSkyIS Posted October 18, 2010 Share Posted October 18, 2010 create a new column in your article table like 'article_views' or similar, to store the number of views. Whenever someone requests and article, set the article_views column for that article = (article_views + 1) Link to comment https://forums.phpfreaks.com/topic/216150-how-to-count-number-of-article-views-in-php-mysql/#findComment-1123403 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.