Hi,
I'm a complete novice when it comes to PHP and I've inherited tons of PHP from the last web designer.
There is a dialog box that pops every time someone visits the site to select their region.
I need to change the code below so that the cookie doesn't expire unless deleted by the user. So the users preference is kept in the browser unless they delete cookies.
At the moment everytime someone visits the site they have to choose their region even if they previously visited the site a short time ago.
function createCookie(country,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = country+"="+value+expires+"; path=/; domain=xxxxxxxxxx.com;";
Any help much appreciated.