Hi!
I made a website for a client 2 years ago, and the guys had the great idea of putting the website on a subdomain. I had a cool cookie system, that allowed the user to choose between four different styles. Now I have a problem with my cookie system. The cookie is created on :
blog.domain.com
and apparently it’s read on domain.com, so it’s not found. I searched everywhere, but I don’t know how to specify that it has to look inside blog.domain.com.
That’s the cookie called styleName that I’m talking about. It was situated at domain.com and it worked flawlessly, and now its at blog.domain.com and it’s considered as empty by my code…
Here is my code :
[code=php]<?php
if (!empty($_COOKIE[‘styleName’])) { ?>
</noscript>
<script type=”text/javascript” language=”javascript”>
var currentStyle = getDataCookie(‘styleName’);
document.write (‘<link rel=”stylesheet” title=”default” type=”text/css” href=”http://www.millesaisons.fr/millesaisons/wp-content/themes/default-fr/’ + currentStyle + ‘.css” />’);
</script>
Yeah, there is some javascript involved…
Thanks for all advice !