Storing a cookies when a anchor<a> is clicked

Hi guys,
I remember at one point I used to know how to do this, I can not recall how I managed :blush:
Is there a way that when a link (<a>) is clicked a cookie can be stored so that when that page loads again the link is automatically clicked.

In this case the link is a “skip intro” during a welcome video. and I want it so that if the user has seen it once, they do not have to see it again each time they visit nor do they have to click the “skip intro” again.

So I was wondering if someone could help me set up so code where it remembers if the user skipped the intro or has seen it before and stores it in a cookie. And if so on the page load in a new session it automatically skips the intro by self-clicking on that link?

Thanks in Advance,
Team 1504

To set the cookie you will need JavaScript and either onClick or onKeyup to fire the event.
Google “JavaScript set cookie”.
Then use PHP if (isset ($_COOKIE[‘name’])){
// do a header location to skip the intro
}

HTH

Thank you very much lorenw!