<% if Request("a")="incluir" then nome = seguranca(trim(request("categoria"))) if nome<> "" then SQL = "Insert Into categorias (nome) values ('"&nome&"')" objConexao.Execute(SQL) response.Redirect "categorias.asp?msg=Categoria "&nome&" incluida com Sucesso" else response.Clear() response.Redirect "categorias.asp?msg=O campo Categoria é obrigatorio!!" end if end if if Request("Remover")<>"" then SQL = "DELETE FROM categorias WHERE id="&seguranca(trim(request("Remover"))) objConexao.Execute(SQL) response.Redirect "categorias.asp?msg=Categoria Deletada com Sucesso" end if %>

Cadastro de Categorias
Categoria

<% SQL = "SELECT * FROM categorias ORDER BY nome" set rsCat = ObjConexao.Execute(SQL) if not rsCat.Eof then %> <% do while not rsCat.Eof %> <% rsCat.MoveNext loop %>
Categoria Cadastradas
<%=rsCat("nome")%> ">Ver Banners ">Remover
<%end if %>