Hey people!
Here's a few inquiries about COOKIES, any help, and especially coding examples are greatly appreciated:
I have a PHP page which call enteries from my database via an ID number supplied by the URL string. For instance:
content.php?345
Now, what I'm looking to do is, every time an ID is accessed, the a COUNT is added to a COUNTER in my database, letting me know that someone has visied the page that day.
My goal is to SET A COOKIE when the user visits the page of a certain ID that expires at the end of the day. This allows that user to visit that ID as many times in that day that they care to, and only 1 COUNT will be added to my database.
...Then at the end of the day, the COOKIE expires.
Now, my issue is SETTING the cookie for multiple ID calls...
For instance...
content.php?345
content.php?125
content.php?689
Are all access by one user in a day. How would I make it so that the COOKIE gets set with the first call, then updated as the user accesses other IDs?
Then of course expiring the entire cookie at the end of the day...
ANY HELP IS APPRECIATED!
Thanks.