<%@ Language=VBScript %>
<% Response.ContentType="text/vnd.wap.wml" %>
<?xml version="1.0" encoding="gb2312"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="WAP 电子银行">
<p>
欢迎来到WAP 电子银行 <br/>
请添加帐户: <input type="text" maxlength="10" />
<do type="accept" label="Check Bal">
<go href="addit.asp" method="post">
<postfield value="$accountno" />
</go>
</do>
</p>
</card>
</wml>
addit.asp
<%@ Language=VBScript %>
<% Response.ContentType="text/vnd.wap.wml" %>
<?xml version="1.0" encoding="gb2312"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="WAP 电子银行">
<p>
<%
Set cn = Server.CreateObject("ADODB.Connection")
Set rs= Server.CreateObject("ADODB.RecordSet")
cn.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ="&Server.MapPath("bank.mdb")
txtSQL="select *from info"
rs.open txtSQL,cn,1,2
rs.addnew
rs("name")=request("accountno")
rs.update
response.write "成功添加"
%>
</p>
</card>
</wml>
数据库结构:
bank 库
info表
name price 字段
victor 1
test 2