Answers

Question and Answer:

  Home  Jnr PHP/Codeigniter Developer

⟩ Tell us how do you create a persistent cookie in php?

Cookies will only persist for the time you define. To do it for 1 year you can simply do:

setcookie( "cookieName", 'cookieValue', strtotime( '+1 year' ) ); //set for 1 year

 189 views

More Questions for you: