`print_r($_COOKIE)` returns an array with only the session cookie and it's value, that is 

```
Array ( [PHPSESSID] => 0cfbom6llfl3ho93n7bljnns14 )

```

However, I did set other cookies. I checked the browser and they do exist. I did the setting like this:

```
setcookie("cookie_name",$myvar,
time() + (20 * 365 * 24 * 60 * 60),
"/", "mydomain.com",
true, true
);

```

The browser shows the cookie name as `cookie_name` and the value as the value of `$myvar` so apparently there's no problem in the setting of the cookie.

Looking at both cookies side-by-side on the browser the only difference is that the session cookie's domain is `mydomain.com` while `cookie_name`'s domain is `.mydomain.com`. Is that the problem? If so, how can I solve it?

Edit: The dot wasn't the problem.