Cookies seen by everyone
<p>Ok, so I want to store some user options in $_COOKIES after form submit.
My code is this:
<code></p>

<pre><code>    $reason=array_values(array_filter($_POST['reasontext']));
    $str=implode('|',$reason);

    if(!isset($_COOKIE['reason'])){
         setcookie('reason',$str,time()+86400*30*12);
    }elseif(isset($_COOKIE['reason2'])){
         setcookie("reason", "", time()-3600);
         setcookie("reason",$_COOKIE['reason2'],time()+86400*30*12);
         setcookie('reason2', "", time()-3600);
    }else{
         setcookie("reason", "", time()-3600);
         setcookie('reason',$str,time()+86400*30*12);
    }
</code></pre>

<p></code></p>

<p>Basically, for an array of let`s say: '1'=>'Test1', '2'=>'Test2', '3'=>'Test3'</p>

<p>The select tool should have had 3 options different for each user, depending on what the user submited as $_POST['reasontext'].</p>

<p>Well this isn`t so, <strong>each user can clearly see what the other one has submited and stored in the cookie which should have been Personal</strong>.</p>

<p>What I want is that each cookie 'reason' to be stored on each users computer and from there to load the different user-customised options. </p>

<p>Any tips? </p>

<p>Thanks in advance for the heads up :)</p>
