I am having problems with a clients site...someone has coded this site and forgot to deal with the delete button action which is in the backend of the site...the following is the code used to delete the appropriately selected content from the site/news section
the whole site has been coded in .asp
here is the main php code that im using when user clicks on delete
<%
If Session("LoggedIn") <> True Then
Response.Redirect("login.asp")
End If
%>
<% Response.Buffer = True %>
<!-- #Include virtual="include/adovbs.inc" -->
<td valign="top"><p class="subHeader">Delete News</p>
<%
Rs.Open "SELECT * FROM News WHERE NewsID=" &Request("NewsID") ,Connect' ,3,2
'If Request("PW")<>"test" Then
%>
<form id="form1" name="form1" method="post" action="delnews.asp?NewsID=<%=Request("NewsID")%>">
<% 'Else
'Rs.Open "SELECT * FROM News WHERE NewsID="&Request("NewsID") ,Connect ,3,2
'If Request("PW")<>"test" Then
Rs.Delete "DELETE FROM News WHERE NewsID="&Request("NewsID") ,Connect' ,3,2
Rs.Close
'End If
Response.Redirect "viewnews.asp"
'End If
%>
When the Delete button is pressed i get the following:
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'Delete'
/cms/delnews.asp, line 113
with a textbox asking for a password???
please help
the whole site has been coded in .asp
here is the main php code that im using when user clicks on delete
<%
If Session("LoggedIn") <> True Then
Response.Redirect("login.asp")
End If
%>
<% Response.Buffer = True %>
<!-- #Include virtual="include/adovbs.inc" -->
<td valign="top"><p class="subHeader">Delete News</p>
<%
Rs.Open "SELECT * FROM News WHERE NewsID=" &Request("NewsID") ,Connect' ,3,2
'If Request("PW")<>"test" Then
%>
<form id="form1" name="form1" method="post" action="delnews.asp?NewsID=<%=Request("NewsID")%>">
<% 'Else
'Rs.Open "SELECT * FROM News WHERE NewsID="&Request("NewsID") ,Connect ,3,2
'If Request("PW")<>"test" Then
Rs.Delete "DELETE FROM News WHERE NewsID="&Request("NewsID") ,Connect' ,3,2
Rs.Close
'End If
Response.Redirect "viewnews.asp"
'End If
%>
When the Delete button is pressed i get the following:
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'Delete'
/cms/delnews.asp, line 113
with a textbox asking for a password???
please help