View Counter [closed]

0

I'm doing an application in PHP and would like to make a counter to keep track of every view that the application pages have and store in a database, however I do not have much notion of how to do this.

    
asked by anonymous 01.02.2018 / 23:57

2 answers

0

In the table where the information on this page is stored, put an int field to store the number of views.

When the page is accessed, it takes the current value of the field and adds +1, then it does the update on the table to update the counter.

    
02.02.2018 / 01:58
-1

Create a database and every time someone accesses your page you increase a record in some table in the database, or you do it in a local file and always check either the database or the file when the page loads.

    
02.02.2018 / 00:08