persistent cookie in php
Posted by Raj
persistent cookie in php:
A persistent cookie is a cookie which is stored in a cookie file permanently on the browser's computer.- Content of a Persistent cookie remains unchanged even when the browser is closed.
- Persistent cookies are less secure because users can open cookie files see the cookie values.
- Persistent cookies can be used for tracking long-term information.
Cookies in PHP can be set using the setcookie() function
Syntax:
Setcookie(name, value, expire, path, domain);
Example:
<?php
Setcookie(“Full Name”, “Rajesh Sharma”, time()+3600);
?>
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
cookies,
persistent cookie in php,
PHP,
PHP interview questions and answers,
setcookie()
.You can leave a response, or trackback from your own site.