PHP Counter

im working on a certain website and i need your help, im have a counter on this page that is counting number of visits, and its storing in a table in Mysql database, i want this counter to count from 1 upto 5 and reset the value back to 1, i cant get the loop to work, i want it to just count 1 to 5 only so i can control evenes based on the value in the table counter. please help me if you can.

Thank you

???
Write conditions on the update.

like spring said, you can select the count number before you update and compare it. if it is equal 5 then update query should insert a 0 instead of 6

Sponsor our Newsletter | Privacy Policy | Terms of Service