Jump to content

Cookie Help


GriffonNest

Recommended Posts

Hi everyone! Got a quick (cookie) question.I looked on the internet for some cookie scripts (redirect ones), but unfortunately haven't been too lucky with these. What I want to do is the following: When the cookie is not found it goes to my main page, for example:"www.anynamehere.com"On the main page I can select where I want to go -'Contacts', 'News', 'Forums' and so on. The main page has a drop down list with these options, each option has it's own link. When I click on 'continue' and go to the specific link (ex. www.anynamehere.com/contacts.html) it should remember my selection, so next time I log into www.anynamehere.com it's automatically will take me to contacts.html. I will not see the main page anymore. Now, if from the contacts page I select 'News' and go to www.anynamehere.com/news.html it has to remember that link as well. So if I close my browser and then reopen it, it should take me to www.anyname.com/news.html. I hope that makes sense. If anyone can give me any pointers I would greatly appreciate it. Maybe there is a script like that available online, I just wasn't lucky enough to find one. Thank you in advance!

Link to comment
Share on other sites

You'll need to set the cookie on every page that you want to bookmark. All of the cookies should have the same name so that they overwrite each other, and it's probably easiest to just store the filename or URL that you want to return to. On any page where you want to redirect from you'll need another script to check for the cookie before you set it. If the cookie is there then just read the filename or URL and redirect to that page. There are examples for cookies here: http://www.w3schools.com/js/js_cookies.asp

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...