Saturday 13 Mar 2010   
Add Comment

CFCOOKIE example

ColdFusion Tutorial #37

Cookies are an essential part of modern web applications, often being used as a key element of user authentication. In a nutshell, cookies are values sent between a browser and a webserver and stored on the client's PC on a per domain basis.

For example:
username=fakeuser;password=5f4dcc3b5aa765d61d8327deb882cf99

In ColdFusion, these cookies can be accessed through the 'cookie' scope, with cookie.username and cookie.password .

Setting cookies is just as easy with the CFCOOKIE tag. All it needs is the name, and the value (The expiration time is optional).

To clear a cookie, all you need to do is set the cookie with an expiration of "NOW".

demo.cfm

Test

 
 


Demo

See this code running!


Download

Download this code as a zip!


Comments

There are no comments!

Click button to add a comment


Author

Thomas Stiegler


Published

Tuesday 09 Jun 2009

Tags

cfcookie  cfelse  cfif  cfoutput  cfset 

convert dvd to ipod converter psp   Winnipeg Colleges   Free debt consolidation loan services.   SSAT Prep   Tutorial Jobs for Felons Online   Discount cigarettes   online MBA degree   EMF Financial   Sharath Sury