Call Us : +91-8376986802 (Viber, WhatsApp)

How to set cookies in PHP?



The function setcookie() is used to define a cookie that is to be sent along with HTTP headers. The cookie must be sent prior to any output from the script as is the protocol restriction. After setting the cookies, they can be used when the next page is loaded by using $_COOKIE or $HTTP_COOKIE_VARS arrays.

Leave a Reply