Forum Moderators: coopster
<?
switch($_GET['set']) {
case 'new':
new();
break;
default:
start();
break;
}
function start() {
if(isset($_COOKIE['style5']))
{$stili=$_COOKIE['style5'];}
else
{$stili="default";}
echo "<a href=\"index.php?set=new\">click here to change!</a>";
$es = $stili;
echo "$es";
}
function new() {
$in = $_POST['set'];
setcookie ('style5', $in, time()+31536000, '', 'domain.net', '0');
header("Location: $HTTP_REFERER");
}
?>
I have made this to store a value in cookie browser but doesnt work. What's the problem?
<a href="index.php?set=new">click here to change!</a>
BTW, Welcome to WebmasterWorld, pragone.