I'm developing a photo rating script where I want to show 1 random photo on every mouse click. As it is not member based so I want to store what images did the visitor already browse to avoid showing repeated images to the same visitor.
I want to check if a user has the cookie set then if it doesn't exist create it then add the image id
if cookie exists then it adds image id to it while keeping old ids in the cookie so it becomes like
83|25|18|37|28
every time a visitor views an image, it's id gets added to the cookie.