|
Plug-in PHP: 100 Power Solutions By Robin Nixon (McGraw Hill 2010, ISBN 978-0071666596) Home | About | Buy It |
Chapter 9: Plug-in 69 - Manage CookieCookies are a great way to provide additional functionality to your users and, contrary to the impression that some news reports might give, are not only to track them for advertising purposes. For example, you can save a person's user name and password in a cookie to keep them logged into a site, something PHP sessions do unless cookies are disabled. Cookies are also great for associating variables directly with a user via the browser they use, so you could use them, for example, to make a note that a user has already completed a questionnaire on your site and should not be asked again. |