<% option explicit Response.Buffer = true if session("company_id") <> "" then dim conn dim rs dim ssql dim sSetting_Id dim sDisplayDownload dim return_page %> <% sSetting_Id = trim(request.Form("setting_id")) sDisplayDownload = trim(request.Form("display_download")) 'update data ssql = "select * from tbl_setting where setting_id = '" & sSetting_Id & "'" set rs = server.CreateObject("adodb.recordset") rs.Open ssql,conn,3,3 if sDisplayDownload = "on" then rs.Fields("display_download") = sDisplayDownload else rs.Fields("display_download") = "off" end if rs.Update rs.Close conn.Close set rs = nothing set conn = nothing call UpdateDownloadSection(sDisplayDownload, ucase(Request.Cookies("storename"))) return_page = "" Response.Write return_page else Response.Redirect "../../index.asp" end if %>