Clear cookie with javasript or php script
<p>i have a problem need all you guys help me.i set the cookie with javascript when the user make change to the select tag in html code and clear i want to clear it.</p>

<p><em>*</em> if in php script i just need to clear or delete it , but if in jquery script i need to delete the old one immediately and set a new one of cookie value when the user make change to select tag. let's see the script below.</p>

<p>jquery script</p>

<pre><code>&lt;script type="text/javascript"&gt;
  $(function(){
     $('#category').live('change',function(){
       var opt = $('category :seleted').val();
       document.cookie='category_name='+opt; //set the cookie when user make change
       $.ajax({
         type:'POST',
         url : 'getcatetgory.php',
         data : {option : opt},
         success: function(){alert('you have successfully get on category')}
      });
    });
  });
&lt;/script&gt; 
</code></pre>

<p>html</p>

<pre><code>&lt;select id='category'&gt;
  &lt;option value='car'&gt;Car&lt;/option&gt;
  &lt;option value='house'&gt;House&lt;/option&gt;
  &lt;option value='sport'&gt;Sport&lt;/option&gt;
  &lt;option value='song'&gt;Song&lt;/option&gt;
  &lt;option value='phone'&gt;Phone&lt;/option&gt;
&lt;/selete&gt;
</code></pre>

<p>this is i have done with php script.</p>

<pre><code>unset($_COOKIE['category_name']);
</code></pre>

<p>but it still doesn't work for me.
please guide me  </p>
