% If Request.ServerVariables("REQUEST_METHOD")="POST" Then ID=Request.Form("ID") '------------------------------------ '--save it in the database '------------------------------------ Set DB = New clsDatabase DB.OpenDatabase DATABASE_NAME, "", "" DB.OpenRecord "tsv_webpages" , ID DB.SetField "content" , Request.Form("content") DB.CloseRecord() Set DB = Nothing javascriptMSG = "alert('Page content saved successfully!');" Else ID = Request.QueryString("ID") End If Set DB = New clsDatabase DB.OpenDatabase DATABASE_NAME, DATABASE_USERNAME, DATABASE_PASSWORD numOfRecords = DB.RunQuery("SELECT id, name, content FROM tsv_webpages WHERE id=" & ID) -1 If numOfRecords > -1 Then RecordData = DB.GetLastResults() Else Call myError("Invalid Webpage ID") End If Set DB = Nothing %>