How to delete cookie on browser close in PHP

123

How to delete cookie on browser close in PHP


setcookie('cookie_name', 'cookie_value', 0, '/');

1-  cookie_name : use to set your cookie name.

2- cookie_value : pass value to cookie.

3- Set 0 : delete cookie on browser close

4- ‘/’ :  this use for whole site

LEAVE A REPLY

Please enter your comment!
Please enter your name here