%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <%if not session("AdminOk")="true" then response.Redirect "login.asp" %> <% dim rs dim cn dim msg set cn = server.CreateObject("Adodb.Connection") set rs = server.CreateObject("Adodb.Recordset") cn.Open conn if request.Form("Submit")="Cancella" then Call Del() End if Sub Del() dim num dim i dim Total_Del num = Request.Form("num") for i = 1 to num id = Request.Form("d" & i) if id<>"" then rs.Open "Delete From ProductCategories Where CategoryID=" & id, cn Total_Del = Total_Del + 1 end if next msg = Total_Del & " record(s) cancellati" End Sub rs.open "Select * From ProductCategories", cn %>
Amministrazione
occasioni
<% response.Write(msg) if not rs.EOF then %>
<% else Response.Write "No record found" end if rs.Close cn.Close %>
Ritorna al Menù