Ok guys, first off i’m fairly new to PHP so this might be a simple thing but I am having trouble figuring it out.
Basically, on the main page of my site I have a form that submits a variable ($ts) to another page on the site. The second page takes that variable and uses it to display data. What I am trying to do is set it up so that the page remembers the last 5 strings recieved from the $ts variable and display them in a “recently viewed” column. I am assuming I have to set up an array in the cookie to remember the last 5 variables but I am unsure how to set it up/retrieve the data from the cookie.
I’m just having trouble figuring out how to put this information into an array in a cookie without overwriting the previous entry. I would like it to start overwriting the oldest entry after the 5 entries are filled up and then recall the entries from newest to oldest.
Any help would be appreciated.
TIA