I am trying to set a cookies in the users browser. So if they come back again after 5 days they will get redirect into another page. I know I can do this with an if statement, but confused on how to do it. Say the user visits a page today. Then the user comes back to the page 6 days later and beyond. They will get redirected into another page.. How can I do this?
Set the cookie on the first visit with an expiry time of 5 days have a function check for the cookie's existnace before HTML is sent and send the headers if the cookie is present .