how to destroy a cookie by php condition
I want to destroy the cookie by the php condition but i have not got anything to do that after the lots of research on the google and php manual . i have read at some place that setcookie('cookie_name'); but it just erase the cookie so my question is that how to destroy cookie by php ?
When deleting a cookie you should assure that the expiration date is in the past, to trigger the removal mechanism in your browser
setcookie ("cookie_name", "", time() - 3600); // set the expiration date to one hour ago