Hello, newbie here ? I did a search and either don’t know how to phrase what I’m looking for properly or just can’t find it, I’m not sure which.
I have a website that sells books. There is a page on each book with links to an excerpt. All of the excerpts are image files in one subdirectory, entitled “fiction.” The first time a visitor clicks on the excerpt link, I want them to be taken to a “terms and conditions” page to which they must agree before they can view the excerpt.
I have a code that works fine, they mark the checkbox and the submit button allows them to move to the next page. However, what I’m looking for is something a little more robust that will do two things:
1) create a cookie on the visitor’s computer so that if they view one excerpt, then visit another page OUTSIDE of the “fiction” directory (say, another book) and then re-enter the directory to view a different excerpt, then they are not prompted to agree to the terms again; and
2) once they’ve agreed to the terms and checked the box, then they will be redirected to the appropriate excerpt based upon where they came from.
My question then is simply, can this be done? Though I can code when I need it, I can’t seem to get anything to work right for me on this. Any help or direction would be greatly appreciated.
Thanks for reading this ?