<% id = request("id") response.write ID if not isnumeric(id) then response.write errmessage response.end end if addnews = request("addnews") delnews = request("delnews") Set dConn = Server.CreateObject("ADODB.Connection") dConn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & database_path if addnews = 1 then insertdate = FormatDateTime(Now(), vbShortDate) mySQL = "INSERT INTO tblnews(newstitle, newsbody, newsdate, expire, active) VALUES ('New News Title', 'New News Text', #" & insertdate & "#,'21/06/07' , 0);" dConn.execute(mySQL) redirect = "news-admin.asp" end if if delnews = 1 then mySQL = "DELETE FROM tblnews where ID = " & id & ";" dConn.execute(mySQL) redirect = "news-admin.asp" end if dconn.close %>