Cookie is some text information in client system used to maintain the state of application the data of cookie we can access from any location in the server. Cookie is divided into two types.
1. in memory cookie
2. persistent cookie
- in memory cookie:
A cookie without any explicit time is called as in memory cookie. This cookie stores the information in ram memory location and destroys the data when closed the browser.
- persistent cookie:
Cookie with explicit expiry time is called as persistent cookie. This cookie stores information in hard disc and release the data when life time is completed.
Set Cookie: By using this function we can create cookie is in client system, arguments are cookie name, value and expiry time.
$_COOKIE: By using this Super Global Variable we can read the value of cookie
<a href= “page2.php”>Goa </a>