<!--#include file="conn.asp"-->
<%
dim rs1,exec1,cphm
exec1="select cpno from cpht where cp_name='"&request.form("cp_name")&"'"
set rs1=server.CreateObject("adodb.recordset")
rs1.open exec1,conn,1,1
if not rs1.eof and not rs1.bof then
cphm=rs1("cpno")
rs1.movenext()
end if
%>
<form id="form1" name="form1" method="post" action="cpck.asp">
<input type="hidden" name="cpno" value="<%=cphm%>">
</form>
<%
dim ck_date,cpno,cp_name,po,style,zc,ck_qty,rcf,bgdh,sql
ck_date=trim(request.form("ck_date"))
cp_name=trim(request.form("cplb"))
po=trim(request.form("po"))
style=trim(request.form("style"))
zc=trim(request.form("zc"))
ck_qty=trim(request.form("ck_qty"))
rcf=trim(request.form("rcf"))
bgdh=trim(request.form("bgdh"))
sql="Insert Into chmc (ck_date,cpno,cp_name,po,style,zc,ck_qty,rcf,bgdh) values ('"&ck_date&"','"&cphm&"','"&cp_name&"','"&po&"','"&style&"','"&zc&"','"&ck_qty&"','"&rcf&"','"&bgdh&"')"
conn.execute(sql)
response.redirect "cpck.asp"
%>