I would like to use PHP cookies to control the inclusion of chunks and TVs. I plan to offer a bilingual site with three views;
Languages A and B | Single Language A | Single Language B
I have scripted the following code within a snippet however the resulting cookie fails to show the expected result, any beginner PHP advice very welcome.
<?php
if($_GET['lang'] == 'ker')
setcookie('langKey','ker', time()+3600);
elseif($_GET['lang'] == 'eng')
setcookie('langKey','eng', time()+3600);
else
setcookie('langKey','ker-eng', time()+3600);
print_r($_COOKIE);
?>
The output code:
Array ( [SN4c41e188db0e0] => 52674320f055dddede038c8e758361b1 [langKey] => ker-eng )