cancer10
04-23-2008, 01:58 AM
Hi
I wrote this piece of function that will help prevent SQL Injections in my ASP pages.
Please review this code and tell me if its good and will do the needful. If not, then why and what is the correct code.
<%
function dbsafe(data)
data = replace(data,";","")
data = replace(data,"'","")
data = replace(data,"--","")
data = replace(data,"/*","")
data = replace(data,"*/","")
data = replace(data,"*","")
data = replace(data,"/","")
data = replace(data,"xp_","")
end function
%>
Thanx so much
I wrote this piece of function that will help prevent SQL Injections in my ASP pages.
Please review this code and tell me if its good and will do the needful. If not, then why and what is the correct code.
<%
function dbsafe(data)
data = replace(data,";","")
data = replace(data,"'","")
data = replace(data,"--","")
data = replace(data,"/*","")
data = replace(data,"*/","")
data = replace(data,"*","")
data = replace(data,"/","")
data = replace(data,"xp_","")
end function
%>
Thanx so much