%@ Language=VBScript %> <%Response.Buffer=True%> <%Updated = Request.QueryString("Updated") %> <% PageTitle = "SiteManager - Edit Specification" %> <% PageID=206 %> <% Header %> <% Menu PageID %> <%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <%SpecEdit%> <%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <% Footer %> <% Sub SpecEdit SpecID=Request.QueryString("SID") OpenConnection1 If Request.ServerVariables ("REQUEST_METHOD") = "POST" then If TRIM(Request.Form("txtSpecification"))<>"" then txtSpecification=dbReplace(Request.Form("txtSpecification")) nProductID=Request.Form("nProductID") SQL="UPDATE P_Specs SET txtSpecification='"& txtSpecification & "' WHERE SpecID =" & SpecID DB.Execute(SQL) Response.Redirect("Product_Details.asp?PID=" & nProductID) Else error="A blank Specification cannot be saved!" End If Else SEL="SELECT nProductID,txtSpecification FROM P_Specs WHERE SpecID=" & SpecID SET rs=Server.CreateObject("ADODB.Recordset") rs.Open SEL,DB,1,3 txtSpecification=rs("txtSpecification") nProductID=rs("nProductID") rs.Close End If %>
<%= FormatDateTime(Date,1) %>
Edit Specification![]()
<%=error%>
<% error="" End If End Sub %>