% LinkId = request("LinkId") if LinkId <> "" then set rs = cn.Execute ("SELECT URL, ClickThrus FROM Links WHERE LinkId = " & LinkId) URL = rs("URL") ClickThrus = rs("ClickThrus") if not IsNull(ClickThrus) then ClickThrus = ClickThrus + 1 else ClickThrus = 1 end if rs.Close ''' increment the click_thrus cn.Execute ("UPDATE Links SET ClickThrus = " & ClickThrus & " WHERE LinkId = " & LinkId) response.redirect URL end if %> <% dim dummy do_search = request("do_search") ':: handle the default case(s) for each form (separate from action= parameter) %> <% display_errs display_msg %>