Hi John,
So, any of the chart types are acceptable? You can probably just do this:

<cfif isdefined("url.charttype") AND NOT
listfindnocase("pie,bar,line,pyramid,area,cone,curve,cylinder,step,scatter",
url.charttype)>
<cflocation url=""> </cfif>

This assumes that you're only checking the charttype if the url.charttype
variable exists. If you want to make sure they both exist, you would do
this:

<cfif NOT isdefined("url.charttype") OR NOT
listfindnocase("pie,bar,line,pyramid,area,cone,curve,cylinder,step,scatter",
url.charttype)>
<cflocation url=""> </cfif>

----- Original Message -----
From: "John Munyan" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 18, 2003 3:03 PM
Subject: Question about data validation (beginner)

> 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