<% topic = request.form("topic") msg = request.form("msg") status = request.form("status") show = request.form("show") if show = "ON" then show = 1 else show = 0 end if '============================================== '======= Where the links will be directed '======= if there is an action '============================================== Page = "research_add" '============================================== '======= Where the links will be directed '======= if there is a jump action '======= [e.g. After addition, we need to jump to the edit page] '============================================== Page2 = "research_edit" '============================================== '======= Set the db table belonging to this page '============================================== dbTable = "page_research" '============================================== '======= including the HeaderTableStart '============================================== HeaderTableTitle = "Research: Add" %> <% ''''' HeaderTableEnd : must be added after including the HeaderTableStart '============================================== If status = "ok" then if msg = "" then writeMSG "Please fill the blank fields.", "ErrorType" Else '''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''' In executing query: if there is Error Resume Next '''''''''''''''''''''''''''''''''''''''''''''''''''''''' On Error Resume Next selectSQL = "SELECT * FROM "&dbTable&" ORDER BY orderid DESC" set rs=ADO.execute(selectSQL) if not rs.eof then orderid = cint(rs("orderid")) + 1 else orderid = 1 end if addSQL= "INSERT INTO "&dbTable&" (orderid, thetopic, thetext ,show) VALUES ("&orderid&", '"&topic&"', '"&msg&"','"&show&"')" ADO.execute(addSQL) if err.number = 0 then writeMSG "Addition done successufly." , "OkType" response.write "
" else writeMSG "Error : "& err.description & " from " & err.source &".", "ErrorType" end if status= "exit" End If End if %> <% If status <> "exit" then %>
Adding a research page information

  Topic <% textareaname = "topic" textareawidth = "100%" textareaheight = "50px" %>
  Text

 


<% textareaname = "msg" textareawidth = "100%" textareaheight = "200px" %>
 Show Show


<% End if ADO.close Set ADO=Nothing Response.write HeaderTableEnd %>