表单页:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<title>录入数据</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form name="form1" method="post" action="addsav.asp">
<table width="75%" height="372" border="0" bgcolor="#666666">
<tr>
<td><table width="100%" height="366" border="0" cellpadding="1" bgcolor="#FFFFFF">
<tr>
<td>出货日期</td>
<td colspan="2"><input name="date" type="text" id="date"></td>
<td> </td>
</tr>
<tr>
<td width="31%">手工帐编号</td>
<td width="43%" colspan="2"> <input name="no" type="text" id="no">
</td>
<td width="26%"> </td>
</tr>
<tr>
<td>财务单编号</td>
<td colspan="2"> <input name="noo" type="text" id="noo"> </td>
<td> </td>
</tr>
<tr>
<td>客户名称</td>
<td colspan="2"> <input name="name" type="text" id="name"> </td>
<td> </td>
</tr>
<tr>
<td>产品规格</td>
<td colspan="2"> <input name="item" type="text" id="item"> </td>
<td> </td>
</tr>
<tr>
<td>订购数量</td>
<td colspan="2"> <input name="sheets" type="text" id="sheets"> </td>
<td>单位:块</td>
</tr>
<tr>
<td>订购数量</td>
<td colspan="2"> <input name="cbm" type="text" id="cbm"> </td>
<td>单位:立方米</td>
</tr>
<tr>
<td>单价</td>
<td colspan="2"> <input name="unit" type="text" id="unit"> </td>
<td>元</td>
</tr>
<tr>
<td>总价</td>
<td colspan="2"> <input name="amount" type="text" id="amount"> </td>
<td>元</td>
</tr>
<tr>
<td>载货车号</td>
<td colspan="2"> <input name="car" type="text" id="car"> </td>
<td> </td>
</tr>
<tr>
<td>订货类别</td>
<td colspan="2"><input name="sort" type="text" id="sort"></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> <input type="submit" name="Submit" value="提交"> </td>
<td> <input type="reset" name="Submit2" value="修改"> </td>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
数据存储页:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%
date=Trim(request.Form("date"
)
no=Trim(request.Form("no"
)
noo=Trim(request.Form("noo"
)
name=Trim(request.Form("name"
)
item=Trim(request.Form("item"
)
sheets=Trim(request.Form("sheets"
)
cbm=Trim(request.Form("cbm"
)
unit=Trim(request.Form("unit"
)
amount=Trim(request.Form("amount"
)
car=Trim(request.Form("car"
)
sort=Trim(request.Form("sort"
)
set rs=server.CreateObject("adodb.recordset"
sql="select * from info where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("date"
=date
rs("no"
=no
rs("noo"
=noo
rs("name"
=name
rs("item"
=item
rs("sheets"
=sheets
rs("cbm"
=cbm
rs("unit"
=unit
rs("amount"
=amount
rs("car"
=car
rs("sort"
=sort
rs.update
rs.close
set rs=nothing
conn.close
set rs=nothing
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="refresh" content="2; url=write.asp">
</head>
<body>
done
</body>
</html>
数据结构:
表info
字段:ID,date,no,noo,name,item,sheets,cbm,unit,amount,car,sort
郁闷!!!
源文件
www.up3.cn/promotion/promotion.rar