I have this script below and it give me a PHP error, anyone have a solution? <?php setcookie('{$_GET['r']}','blah',time()+86400); //expires in 1 day ?> PHP: + rep thanks!
what error are you getting? anyways a quick glance on your code makes this stand out... please try to replace it with the code below setcookie($_GET['r'],'blah',time()+86400);
regarding a one small part of your script: '{$_GET['r']}' PHP: Above is wrong So, you can either use: setcookie($_GET['r'],'blah',time()+86400); PHP: or setcookie("{$_GET['r']}",'blah',time()+86400); PHP: