doh!  me thinks I've been dwinkin two!  :|

-----Original Message-----
From: Knudsen, Douglas
Sent: Tuesday, November 18, 2003 4:18 PM
To: CF-Talk
Subject: RE: Question about data validation (beginner)

further...add in <cfparam name="url.charttype" default=""> at the top and avoid all those IsDefined() calls.  cfdefaultcase in the cfswitch can catch when the url var doesn't exist.

Doug

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 4:11 PM
To: CF-Talk
Subject: Re: Question about data validation (beginner)

look up the <cfswitch> & <cfcase> tags, will work much ber than what ur
doing.

pluas u need to take those "or"'s out and use <cfelseif> if u gunna do it
taht way

> I have a page which accepts several url variables.  I want to make sure
> if someone manipulated the url in the browser and set the value outside
> what is handled by the page that this is handled.
>
>
>
> I was thinking I could check for the existence of the url variable and
> then if set check for the value not being what I am accepting.  If the
> value is not what I am expecting I take corrective action.
>
>
>
> I am at a lose to figure out how you handle the 'if it's not what I am
> expecting ' as opposed to the 'I am expecting this, do that'
>
>
>
> Below is my failed attempt.  Any advice?
>
>
>
> Thanks,
>
>
>
> John
>
>
>
> <!--- Catch ChartType values outside the range that are accepted by this
> page --->
>
> <cfif IsDefined("URL.ChartType") AND url.ChartType NEQ "pie"
>
> or
>
> IsDefined("URL.ChartType") AND url.ChartType NEQ "bar"
>
> or
>
> IsDefined("URL.ChartType") AND url.ChartType NEQ "line"
>
> or
>
> IsDefined("URL.ChartType") AND url.ChartType NEQ "pyramid"
>
> or
>
> IsDefined("URL.ChartType") AND url.ChartType NEQ "area"
>
> or
>
> IsDefined("URL.ChartType") AND url.ChartType NEQ "cone"
>
> or
>
> IsDefined("URL.ChartType") AND url.ChartType NEQ "curve"
>
> or
>
> IsDefined("URL.ChartType") AND url.ChartType NEQ "cylinder"
>
> or
>
> IsDefined("URL.ChartType") AND url.ChartType NEQ "step"
>
> or
>
> IsDefined("URL.ChartType") AND url.ChartType NEQ "scatter">
>
> <cflocation
> url=""> > addtoken="no">
>
> </cfif>
>
> <!--- End Catch ChartType values outside the range that are accepted by
> this page --->
>
>
>
  _____  

  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to