View Single Post
Banned
25Jul2011,14:32  
ankitasharma's Avatar
A cookie is often used to identify a user. A cookie 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.


How to create the cookie :-

The setcookie() function is used to set a cookie.

Note: The setcookie() function must appear BEFORE the <html> tag.

Syntax:-

setcookie(name, value, expire, path, domain);