Problem Statement
Which function is used to set a cookie in PHP?
Explanation
setcookie() is used to send a cookie from the server to the client. Cookies store small data on the user's browser.
Code Solution
SolutionRead Only
setcookie('user','John',time()+3600);