Interview Questions

How to reset/destroy a cookie

PHP Interview Questions and Answers


(Continued from previous question...)

How to reset/destroy a cookie

Reset a cookie by specifying expire time in the past:
Example: setcookie('Test',$i,time()-3600); // already expired time

Reset a cookie by specifying its name only
Example: setcookie('Test');

(Continued on next question...)

Other Interview Questions