[thelist] Friday Freebie

jeff jeff at members.evolt.org
Wed Dec 27 09:54:53 CST 2000


raymond,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Raymond Camden
:
: It _will_ throw an error, however, if url.x is not
: a number.  Notice the TYPE= part to my code?
: That forces the value to be a certain type.
: Therefore, if the user mucks with the query
: string, and changes id=5 to id=ray, they will
: get an error. (Of course, it's their fault, but
: normally it's better to suppress things, and
: in this case, you may want to log an ip to a
: security file or somesuch.)
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ok, so i guess that begs the question then - why bother with the type
attribute in this situation?  i don't see any advantage of typing it to a
number, especially if all it will do is give the potential for an error to
be caused.  i do like how it makes it more apparent what the variable type
you're working with, but the default value of 0 or the Val() in the
conditional tells me that much already.

thanks,

.jeff

name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org





More information about the thelist mailing list