This is a computer scripting language, originally designed for producing dynamic web pages. It is for server-side scripting, but can be used from a command line interface or in standalone graphical applications.
A cookie is often used to identify a user. It is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With PHP, you can both create and retrieve cookie values.
Create a Cookie
The setcookie() function is used to set a cookie.
setcookie("user", "Alex Porter", time()+3600);
Retrieve the Cookie
The PHP $_COOKIE variable is used to retrieve a cookie value.
// Print a cookie
// A way to view all cookies
For more details kindly visit:PHP Training
General discussion on PHP
2 posts • Page 1 of 1