/asp/freeapps/linkmentor/goto.asp
<%
OPTION EXPLICIT
%>
<!--#include file="inclink.asp"-->
<%
'Some before doings...
Dim oConn, oRS, sRedir, nID
Set oConn = IncLink_GetDatabaseConn()
nID = Request.QueryString("id")
Set oRS = oConn.Execute( "select outurl from " & FAQ_GetTablePrefix() & "ref_site where id=" & nID )
sRedir = oRS("outurl").Value
oRS.Close
Set oRS = Nothing
oConn.Execute "update " & FAQ_GetTablePrefix() & "ref_site set outcount=outcount+1 where id=" & nID
oConn.Close
Set oConn = Nothing
Response.Redirect sRedir
%>