Whatever message this page gives is out now! Go check it out!
Parameter | Required\Optional | Description |
key | optional | A random token is generated based on the key provided. This key is stored in the session. |
forceNew | optional | If set to true, a new token is generated every time the method is called. If false, in case a token exists for the key, the same key is returned. |
<cfset csrfToken=CSRFGenerateToken() />
<cfform method="post" action="sayHello.cfm">
<cfinput name="userName" type="text" >
<cfinput name="token" value="#csrfToken#" type="hidden" >
<cfinput name="submit" value="Say Hello!!" type="submit" >
</cfform>