its because where in your "location.href" do you put the query paramter to run the delete?
oh wait.. you don't
here's your code
if request("action") = "delete" then
sql = "DELETE* FROM messages WHERE id = '" & request("id")&"'"
Connstring.execute(sql)
Response.Write("<h1>The message has been deleted.</font><br>Back to <a href='forumlist.asp'>Forum</h1>")
Connstring.Close
end if
you (1) don't pass "action=delete" to get inside the if... then... and (2) also do not pass the "id" that the SQL statement is going to use to delete the requested record