<% if request("action") = "update" then if request("password") <> "hike97" then msg = "The password you entered was not correct." else set cnn = server.createobject("adodb.connection") cnn.open connect cnn.execute "UPDATE tbl_store SET active=0" for each itm in request.form if left(itm, 6) = "store-" then temp = replace(itm,"store-","") if request(itm) & "" = "1" then cnn.execute "UPDATE tbl_store SET active=1 WHERE id=" & temp end if end if next cnn.close set cnn = nothing end if end if %> <%if msg <> "" then%> <%end if%> <% set rs = server.createobject("adodb.recordset") sql = "SELECT * FROM tbl_store ORDER BY name" rs.open sql, connect, 1, 3 do until rs.eof if rs("active") then color="green" else color="red" %> <% rs.movenext loop rs.close set rs = nothing %>
<%=msg%>
 
Store Active

<%=rs("name")%> " value="1" <%if rs("active") then response.write "checked"%>>

Password: