<% ' Some Global Functions Function ChkString(string) if String = "" then string = " " string = replace(string, "'", "''") ChkString = string End Function %> Add <% ' Procedure to Add a Forum to the database Sub add_forum set my_conn= Server.CreateObject("ADODB.Connection") my_Conn.Open ConnString strSql = "Select * from forum where forum_id = " & Request.Form("forum") set rs = my_conn.Execute (strSql) tmpName = rs("F_Name") tmpDescription = rs("F_Description") tmpCat = rs("F_Cat") tmpMod = rs("F_Moderator") rs.close %>

Add Forum

" name="id">
Forum Name :
Forum Description :

Forum Caregory :
Forum Moderator :
<% End Sub Sub Update_Forum set my_conn= Server.CreateObject("ADODB.Connection") my_Conn.Open ConnString strSql = "UPDATE forum SET f_name = '" & chkString(Request.Form("name")) & "', " strSql = StrSql & "f_Description = '" & chkString(Request.Form("description")) & "', " strSql = StrSql & "f_cat = " & Request.Form("category") & ", " strSql = StrSql & "f_moderator = " & Request.Form("moderator") strSql = StrSql & " WHERE forum_id = " & Request.Form("id") ' Response.Write StrSql my_conn.Execute StrSql my_conn.close set my_conn = nothing Response.Write "

Forum Updated

" End Sub %> <% Select Case Request.QueryString("mode") case "doit" call Update_Forum case "show" call add_forum case Else Response.Write "Error" End Select %>