<% Option Explicit %> <% 'Set the response buffer to true as we are redirecting Response.Buffer = True 'Dimension variables Dim rsDeleteComments 'Database Recordset Variable Dim laryMemberID 'Array to hold the ID number for each comment to be deleted 'If the session variable is False or does not exsist then redirect the user to the unauthorised user page If Session("blnIsUserGood") = False or IsNull(Session("blnIsUserGood")) = True then 'Redirect to unathorised user page Response.Redirect "unauthorised_user_page.htm" End If 'Run through till all checked mailing list are deleted For each laryMemberID in Request.Form("chkID") 'Delete the posts in this topic strSQL = "DELETE FROM tblMailingList WHERE tblMailingList.Mail_ID =" & CLng(laryMemberID) & ";" 'Write to database adoCon.Execute(strSQL) Next 'Reset server variable Set adoCon = Nothing Set strCon = Nothing 'Return to the Select News Item page Response.Redirect "delete_list_members_form.asp?PagePosition=" & Request.QueryString("PagePosition") %>