Help with setting Cookies
-
I am trying to create a splash page (I know not the best, but my friend wants it) where you can pick which language to visit the site.
English
Dutch
French
GermanI would like when they click a language that when they go off the site when they come back it remembers which language they pick.
I have tried a plugin that has helped a bit to get started, but I am not sure how to set a cookie for each language. Here is where I am at:
<?php get_header(); ?> <SCRIPT LANGUAGE="JavaScript"> <!-- hide from old browsers function setCookie(name, value, expires, path, domain, secure) { document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function setsplash() { setCookie("splash", "1", "", "/"); } //--> </SCRIPT> <div id="splash"> <div class="splash content"> <div class="splash enter"> <ul> <li class="en"><a onclick="setsplash()" href="" title="English">English</a></li> <li class="nl"><a onclick="setsplash()" href="https://b-e-m.org/nl/" title="Nederlands">Nederlands</a></li> <li class="fr"><a onclick="setsplash()" href="https://b-e-m.org/fr/" title="Fran?ais">Fran?ais</a></li> <li class="de"><a onclick="setsplash()" href="https://b-e-m.org/de/" title="Deutsch">Deutsch</li> </ul> </div> </div> </div> <?php get_footer(); ?>
Any help with my lack of php ??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Help with setting Cookies’ is closed to new replies.