Ok, here comes the code. I didn't want to give you too much and then
you say you can't find anything.
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<!-- Database Connection File -->
<!-- #include file="connection.asp" -->
<%
ProductID = Request.Form("ProductID")
SupplierID = Request.Form("SupplierID")
ProductName = trim(Request.Form("ProductName"))
ProductNo = Request.Form("ProductNo")
QuantityPerUnit = Request.Form("QuantityPerUnit")
UnitPrice = Request.Form("UnitPrice")
UnitCost = Request.Form("UnitCost")
CasePack = Request.Form("CasePack")
SizeProduct = Request.Form("SizeProduct")
Weight = Request.Form("Weight")
MFG = Request.Form("MFG")
MFG_Shown = Request.Form("MFG_Shown")
Cotton_Poly = Request.Form("Cotton_Poly")
Ten_Sixteen = Request.Form("Ten_Sixteen")
Make = Request.Form("Make")
MakeShown = Request.Form("MakeShown")
CategoryID = Request.Form("CategoryID2")
ShadeID = Request.Form("ShadeID")
ButtonChoice = Request.Form("ButtonChoice")
Notes = Request.Form("Notes")
ProductName = replace(ProductName, "'", "''")
Make = replace(Make, "'", "''")
MakeShown = replace(MakeShown, "'", "''")
MFG = replace(MFG, "'", "''")
MFG_Shown = replace(MFG_Shown, "'", "''")
Notes = replace(Notes, "'", "''")
If Notes = "" Then
Notes = " "
End If
If ButtonChoice = "Update Product Information" Then
strSQL = "Update Products set ProductName = '" & ProductName &
"', ShadeID = '" & ShadeID & "', Notes = '" & Notes & "', CategoryID =
'" & CategoryID & "', MakeShown = '" & MakeShown & "', Make = '" &
Make & "', Ten_Sixteen = '" & Ten_Sixteen & "', Cotton_Poly = '" &
Cotton_Poly & "', MFG_Shown = '" & MFG_Shown & "', MFG = '" & MFG &
"', Weight = '" & Weight & "', SizeProduct = '" & SizeProduct & "',
CasePack = '" & CasePack & "', UnitCost = '" & UnitCost & "',
UnitPrice = '" & UnitPrice & "', QuantityPerUnit = '" &
QuantityPerUnit & "', ProductNo = '" & ProductNo & "', SupplierID = '"
& SupplierID & "' where ProductID = " & ProductID & ""
cnLinens.Execute(strSQL)
Response.Redirect ("ProductDetails.asp?ProductID=" &
ProductID)
set cnLinens = Nothing
End If
If ButtonChoice = "Insert New Product" Then
strSQL = "Insert into Products (ProductName, ShadeID,
Ten_Sixteen, ProductNo, CategoryID, SupplierID, SizeProduct, CasePack,
Weight, QuantityPerUnit, UnitPrice, UnitCost, MFG, MFG_Shown,
Cotton_Poly, Make, Notes, MakeShown) values ('" & ProductName & "', '"
& ShadeID & "', '" & Ten_Sixteen & "', '" & ProductNo & "', '" &
CategoryID & "', '" & SupplierID & "', '" & SizeProduct & "', '" &
CasePack & "', '" & Weight & "', '" & QuantityPerUnit & "', '" &
UnitPrice & "', '" & UnitCost & "', '" & MFG & "', '" & MFG_Shown &
"', '" & Cotton_Poly & "', '" & Make & "', '" & Notes & "', '" &
MakeShown & "')"
cnLinens.Execute(strSQL)
Response.Redirect ("Products.asp")
set cnLinens = Nothing
End If
%>
</BODY>
</HTML>