Cita:
Iniciado por Shiryu_Libra
seria mejor si utilizaran las funciones por separado, para motivos de depuracion

Si aún continuas queriendo integrar ambas funciones a pesar de lo que comenta el sensei

,prueba así
Código PHP:
function ValidaDatos(Nombre,ValorDefecto) 'nombre es el login y valordefecto "".
if not ActiveFile_SeUsa then
if (Request.Form(Nombre) <> "") then
ValidaDatos = Request.Form(Nombre)
else
if (Request.QueryString(Nombre) <> "") then
ValidaDatos = Request.QueryString(Nombre)
else
ValidaDatos = ValorDefecto
End if
End if
else ' se está usando el ActiveFile
if not ActiveFile_YaSubido then
ValidaDatos = ValorDefecto
else
dim i, encontrado, str
encontrado = false
str = Nombre
str = replace(str,"x","j")
str = replace(str," "," ")
str = replace(str,"=","")
str = replace(str,"'","")
str = replace(str,"""""","")
str = replace(str," or ","")
str = replace(str," and ","")
str = replace(str,"(","")
str = replace(str,")","")
str = replace(str,"<","")
str = replace(str,">","")
str = replace(str,"having ","")
str = replace(str,"group by","")
str = replace(str,"union select sum","")
str = replace(str,"union select min","")
str = replace(str,"--","")
str = replace(str,"select ","")
str = replace(str,"insert ","")
str = replace(str,"update ","")
str = replace(str,"delete ","")
str = replace(str,"drop ","")
str = replace(str,"-shutdown","")
for i = 1 to nActiveFile_Vars
if ActiveFile_Vars(1,i) = str then <-esto para que sirve???
ValidaDatos = ActiveFile_Vars(2,i)
encontrado = true
end if
next
if not encontrado then
ValidaDatos = ValorDefecto
end if
end if
end if
End Function
Suerte