<% 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 = "home_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 = "home_edit" '============================================== '======= Set the db table belonging to this page '============================================== dbTable = "page_home" '============================================== '======= including the HeaderTableStart '============================================== HeaderTableTitle = "Home: Add" %> <% ''''' HeaderTableEnd : must be added after including the HeaderTableStart '============================================== If status = "ok" then if msg = "" then writeMSG "Please fill the blank fields.", "ErrorType" Else 'msg = "
"&msg&
'''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''' In executing query: if there is Error Resume Next '''''''''''''''''''''''''''''''''''''''''''''''''''''''' On Error Resume Next addSQL= "INSERT INTO "&dbTable&" (thetext ,show) VALUES ('"&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 home page information

  Text

 


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


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