To mark data that appeared in the time of absence of the user on the website?
Hello, prompt, please, how you can implement the following idea.
When the user visits the site, there appear latest 10 news. Then, when the user leaves and comes back the next day, some news were added (updated).
Question: how can I do that new news, which appeared at the time of the absence on the site the user was marked as "new". Then you need to use $_COOKIES? If so, it will not show pliz example? Thank you!
2 answers
Record in the user profile the date of the last activity.
Date of update / create news > last activity date user = mark "new"
From each entry You can store information about the date/time addition/change (in UTC of course). You can also somewhere to record the date/time the user accesses a list of articles (also in UTC of course). In this case, when you visit the site you can simply make a selection by date.
But where to store the date of the visit - it depends on the specifics of Your site, in cookies, can be anywhere in the database.
Find more questions by tags HTMLHTTP CookiesJavaScriptMySQLPHP