Skip to main content
Participating Frequently
April 23, 2008
Question

coldfusion script

  • April 23, 2008
  • 3 replies
  • 465 views
I am new to coldfusion. I usually program in php. I need to stop the script from going any further if it meets an if statement. in PHP I can just say


Is there a way to do this in coldfusion ?
This topic has been closed for replies.

3 replies

Inspiring
April 23, 2008
StructClear(session)
Inspiring
April 23, 2008
<cfif somecondition is met>
process code
</cfif>
Inspiring
April 23, 2008
It kind of depends on what you are doing at the time and to what extent you want to stop the current CF Code.

CFBREAK will exit a looping statement if conditions are met

CFABORT can stop the entire page from processing if conditions are met

I think CFBREAK is most likely what you are looking for though
MidOhioITAuthor
Participating Frequently
April 23, 2008
Thank you very much SafariTECH!
<cfabort> is exactly what I needed !

I also seem to have another small issue with a logout. There are some session variables that do not seem to be destroyed. Do you know of a good way to destroy them?