jabber
answered Jul 21 '21 00:00
setcookie function will create cookie with given name and value and timeline
setcookie("login", 1);
setcookie("login", 1, time()+7200);
setcookie("login", 1);
this code will set the cookie named 'login' and set value it to 1
setcookie("login", 1, time()+7200);
this code will do same job pervious one : the cookie named 'login' and set value it to 1 but it also stats that when this cookie expire which is time()+7200 , its 2 hour after it created .