<html><HEAD><TITLE>欢迎光临</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
href="11.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.style6 {font-size: 12px}
-->
</style>
</HEAD><body><p align="center"><font size="5" face="隶书">成都</font></p>
<div align="left">
<table border="0" width="861" height="448">
<tr>
<td width="567" height="444" bgcolor="#FFFFFF"> <img src="chengd.gif" width="567" height="299" border="0" usemap="#Map"></td>
<td width="284" height="444"><span class="style6"> </span>
<p class="style6"></p>
<p class="style6"></p>
<p class="style6"></p>
<p class="style6"></p>
<p class="style6"></p>
<p class="style6"><a href="../fuz_dy/1/test1.asp">这里</a></p>
<form name="form1" method="post" action="">
<p>请输入上传文件日期:
<input name="scrq" type="text" value="请输入日期">
</p>
<p>
<input type="submit" name="Submit" value="确定">
<input type="reset" name="Submit2" value="取消">
</p>
</form> <p class="style6"><span class="style6">请在上传完毕后,通知我公司进行点评。</span></p>
</td></tr>
</table>
</div><map name="Map">
<area shape="rect" coords="47,9,187,50" href="chul.asp?id=a">
<area shape="rect" coords="7,82,49,160" href="chul.asp?id=b">
<area shape="rect" coords="10,210,52,284" href="chul.asp?id=c">
<area shape="rect" coords="195,201,354,240" href="2/a.asp?id=a">
<area shape="rect" coords="515,208,561,290" href="chul.asp?id=f2">
<area shape="rect" coords="429,159,483,228" href="2/f.asp?id=f">
<area shape="rect" coords="507,102,560,179" href="chul.asp?id=f1">
<area shape="rect" coords="403,249,470,273" href="chul.asp?id=q">
<area shape="rect" coords="199,252,349,288" href="chul.asp?id=w">
<area shape="rect" coords="204,10,348,50" href="chul.asp?id=e">
</map>
</body></html>
怎么将以上代码修改为,在提交之后向数据库添加一条记录,并转到另外一个地址去?
这个是数据库链接的语句
mdbfile=server.mappath("/database/abc.mdb")
set MyCon=server.createobject("adodb.connection")
MyCon.open "driver={microsoft access driver (*.mdb)};uid=dx;dbq="&mdbfile
假设我新建立一长表叫 rqi 代码怎么修改才能正常使用呢?
问题解决马上揭帖
这个东西是以前别人搞的,我不会用asp,请求高人啊。
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
href="11.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.style6 {font-size: 12px}
-->
</style>
</HEAD><body><p align="center"><font size="5" face="隶书">成都</font></p>
<div align="left">
<table border="0" width="861" height="448">
<tr>
<td width="567" height="444" bgcolor="#FFFFFF"> <img src="chengd.gif" width="567" height="299" border="0" usemap="#Map"></td>
<td width="284" height="444"><span class="style6"> </span>
<p class="style6"></p>
<p class="style6"></p>
<p class="style6"></p>
<p class="style6"></p>
<p class="style6"></p>
<p class="style6"><a href="../fuz_dy/1/test1.asp">这里</a></p>
<form name="form1" method="post" action="">
<p>请输入上传文件日期:
<input name="scrq" type="text" value="请输入日期">
</p>
<p>
<input type="submit" name="Submit" value="确定">
<input type="reset" name="Submit2" value="取消">
</p>
</form> <p class="style6"><span class="style6">请在上传完毕后,通知我公司进行点评。</span></p>
</td></tr>
</table>
</div><map name="Map">
<area shape="rect" coords="47,9,187,50" href="chul.asp?id=a">
<area shape="rect" coords="7,82,49,160" href="chul.asp?id=b">
<area shape="rect" coords="10,210,52,284" href="chul.asp?id=c">
<area shape="rect" coords="195,201,354,240" href="2/a.asp?id=a">
<area shape="rect" coords="515,208,561,290" href="chul.asp?id=f2">
<area shape="rect" coords="429,159,483,228" href="2/f.asp?id=f">
<area shape="rect" coords="507,102,560,179" href="chul.asp?id=f1">
<area shape="rect" coords="403,249,470,273" href="chul.asp?id=q">
<area shape="rect" coords="199,252,349,288" href="chul.asp?id=w">
<area shape="rect" coords="204,10,348,50" href="chul.asp?id=e">
</map>
</body></html>
怎么将以上代码修改为,在提交之后向数据库添加一条记录,并转到另外一个地址去?
这个是数据库链接的语句
mdbfile=server.mappath("/database/abc.mdb")
set MyCon=server.createobject("adodb.connection")
MyCon.open "driver={microsoft access driver (*.mdb)};uid=dx;dbq="&mdbfile
假设我新建立一长表叫 rqi 代码怎么修改才能正常使用呢?
问题解决马上揭帖
这个东西是以前别人搞的,我不会用asp,请求高人啊。
mycon.exec "create table rqi(field int)"
MyCon.Execute(sql)
在save.asp文件中
<%
dim scrq
scrq = request.form("scrq")
if(scrq<>"")Then
mdbfile=server.mappath("/database/abc.mdb")
set MyCon=server.createobject("adodb.connection")
MyCon.open "driver={microsoft access driver (*.mdb)};uid=dx;dbq="&mdbfile
MyCon.Execute("INSERT INTO 表名(scrq)values('"& scrq &"')")
Response.Redirect("index.asp")
End If
%>
代码未经测试...