Cookies in subdomain doesnt work
<p>I got the following code:</p>

<pre><code>&lt;?php
$id = $_GET['id'];
$vote = $_GET['vote'];
$month = 2592000 + time();
$cookie = "votez" . $id;
$cookiez = "viewz" . $id;

if(isset($_COOKIE[$cookiez]))        
{
    if(!isset($_COOKIE[$cookie]))        
    {
        setcookie($cookie, "voted", $month, '/', ".mywebsite.co.il");
    }
}
else
{
        setcookie($cookiez, "viewed", $month, '/', ".mywebsite.co.il");
}
</code></pre>

<p>?></p>

<p>lets assume that I go to > www.mywebsite.co.il/example.php?id=1&amp;vote=1
on the first time > it will set the first cookie.
on the second time > it will set the second cookie.
on the third time > nothing will happen</p>

<p>this is how it should work.</p>

<p>but if I go to > www.mywebsite.co.il?/example.php?id=1&amp;vote=2 (after I was at www.mywebsite.co.il/example.php?id=1&amp;vote=1)
it will set the first cookie again.</p>

<p>if I will go to > www.mywebsite.co.il?/example.php?id=1&amp;vote=3 (after I was at www.mywebsite.co.il/example.php?id=1&amp;vote=1)
it will set the first cookie again.</p>

<p>and so on..</p>

<p>what do I need to do so no matter what the vote equal, as long as its the same ID, the cookie will be the same?</p>

<p>(this is not the full code and you dont need the full code in order to understand the problem or to solve it).</p>

<p>thanks!.</p>
