Hello,

I've just been trying to figure out the most efficent way to check for a
passed (form or url) variables pesence and value. The code I've been using
is:

<CFIF (IsDefined("ATTRIBUTES.Request_time") IS "No") OR
(Trim(ATTRIBUTES.Request_time) IS "")>
Request_time is not defined
<CFELSE>
Request_time is defined
</CFIF>

But is this the best way, it must be a common problem. I also thought about
using :

<CFPARAM NAME="ATTRIBUTES.Request_Time" DEFAULT="0">
<CFIF Trim(RequestTime) IS "0">
Request_time is not defined
<CFELSE>
Request_time is defined
</CFIF>

but that doesn't work as it doesn't apply the value 0 if Request_time is
passed but not defined... So is the first method the best?

Thanks
Ben

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to