quote:
Originally posted by Carefree
Hey Gary, you have the code for your referenced link?
Yah, it's real simple/basic, and there is probably a better way, but here ya go...
[word of warning...this code is susceptible to SQL injection if available outside of your secure admin area. I have not accommodated for it, since this was my own little app...not available to public users of my site.]
<%
dim gfn, grs, gSQL, m_id
'---get the id out of the querystring
m_id = request.querystring("id")
'---check for null id
'---check for empty id
'---check for val can't be converted to integer
if (isnull(m_id) or m_id = "") or isnumeric(m_id) = 0 then
'---bad value passed, redirect to error page
response.redirect "URL OF YOUR CHOICE---when error happens"
else
'---convert string to integer
m_id = cInt(m_id)
'---open the connection
Set gfn = Server.CreateObject("ADODB.Connection")
gfn.Open strdbpathforum
'---clear out their spammy crap
upd = "update forum_members set m_homepage = null, m_link1 = null, m_link2 = null where member_id = " & m_id
gfn.execute(upd)
'---back to the list
response.redirect "monitor_member_links.asp?done=1"
'---close connections
gfn.Close
Set gfn= Nothing
Set upd = Nothing
end if
%>