when i try to set cookie in the following way the values show me in the browser for the cookies are like this
cookie name -> recent and value 1%2c2
where 1 and 2 are my get parameters and %2c i dont know what is this i wants , in place of %2c
if(!empty($_GET['c']))
{
$c = $_GET['c'];
if(isset($_COOKIE['recent']))
{
$c=$_COOKIE['recent'].','.$c;
setcookie('recent',$c);
}
else
{
if(setcookie('recent',$c))
{
echo "yes";
}
else
{
echo "no";
}
}
}
echo $_COOKIE['recent'];
http://php.net/manual/en/function.setcookie.php
http://www.php.net/manual/ru/function.urlencode.php