满分一百分属于答对者!

jyngress 2004-04-08 11:39:51
日期 维护者 备注
数据库用ACESS
做一个表格
主页中显示
提交时写入数据库
只要功能的代码,其他的我自己弄。
ASP都忘了,帮帮忙急用。
...全文
72 16 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
chhwang 2004-04-09
  • 打赏
  • 举报
回复
这种问题不回答
dafei0320 2004-04-08
  • 打赏
  • 举报
回复
这个是验证--
<!--#include file="conn.asp"-->
<% dim mc,mm
session("mc")=request.form("mc")
session("mm")=request.form("mm")
rs.open "select * from guanli where name='"&session("mc")&"' and pas='"&session("mm")&"'",conn

if not rs.eof then
response.redirect"../asp.asp"
else
response.redirect"../count/index.asp"
end if
rs.close
set rs=nothing
set conn=nothing
%>
<center><a href="javascript:history.back()">返回</a></center>
dafei0320 2004-04-08
  • 打赏
  • 举报
回复
这是分页显示留言

<!--#include file="conn.asp"-->
<%
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
cnpath="data source=" & server.MapPath("../data/dafei.mdb")
conn.open "provider=microsoft.jet.oledb.4.0;" & cnpath
rs1="select * from dafei order by ID DESC"
%>

<html>
<head><title>查看留言</title></head>
<body background='pic/beijing3.gif'>
<table>
<tr>
<td><img src="pic/logo.gif" width="140" height="84" border="0" alt=""></td>
<td><embed width="620" height="84" src="pic/dafei1.swf"></td>
</tr>
</table>
<div align="center">

<%rs.open rs1,conn,1,2
%>
<% dim page,totle,no,n,ye,zong
zong=rs.recordcount
totle=0
n=3
pagesize=n
page=request("no")
no=rs.absolutepage
rs.movefirst
do while not rs.eof
totle=totle+1
rs.movenext
loop
ye=int(totle/n*-1)*-1
if page<=1 then
page=1
end if%>
<% rs.movefirst
rs.move((page-1)*3)
y=((page-1)*3)
%>
<center>符合要求的一共有<font size="" color="#FF0000"><%=zong%></font>条 <font size="" color="#66FFFF"><%=ye%></font>页</center>
<%while y<((page-1)*3)+3 and y<totle %>
<table border="0" width="760" bgcolor="">
<td bgcolor="#FFFFCC">
<font size="3" color="#3300FF"><b><img src="<%=rs("image")%>" alt="个性头像">留言者:<font size="4" color="#FF00CC"><%=rs("name")%></font>:于<%=rs("time")%>,<font size="4" color="#FF0000">Email:<a href="mailto:<%=rs("email")%>"></font></b><img src="pic/mail.gif" width="40" height="32" border="2" alt="信箱"></font></a> <a href="<%=rs("page")%>" target="_blank"><img src="pic/page.gif" width="40" height="32" border="0" alt=""></a>
<p><font size="4" color="#FF00CC"><%=rs("name")%></font>的留言是:<br>
<table border="2" bordercolor="#FF0066">
<tr>
<td width="750" height="80"><%=rs("word")%></td>
</tr>
</table>
</p>
</table>
<% rs.movenext
y=y+1
wend
rs.close %><br>
<% if page>1 then
response.write"<a href=dafei3.asp?no="&page-1&"><font size=3 color=#CCCC66>上一页</font></a>"
end if%>共有留言<font size="4" color="#FF0000"><%=totle%></font>条 <font size="4" color="#FF66FF"><%=ye%></font>页 当前是第<font size="4" color="#33FF33"><%=page%></font>页
<% if page<ye then
response.write"<a href=dafei3.asp?no="&page+1&"><font size=3 color=#FF00FF>下一页</font></a>"

end if%><p>
zongsh :<%=zong%> page1shi:<%=page1%>

<a href="dafei.asp"><font size="4" color="#CC0000"><b>返回留言本</b></font></a>

</div>
<div align="center">
<img src="pic/xian.gif" width="750" height="29" border="0" alt=""><p>
<a href="http://172.16.4.24" target="_blank"><b>大飞</b></a><font size="3" color="#FF0000"><b>工作室制作</b></font><p>
E-mail:<a href="mailto:dapeng0320@163.net">dapeng0320@163.net</a>

</div>
</body>
</html>
54NB 2004-04-08
  • 打赏
  • 举报
回复
這裡是技術交流的地方,不是求代碼的地方
jyngress 2004-04-08
  • 打赏
  • 举报
回复
是记录太多还要分页
FlashK 2004-04-08
  • 打赏
  • 举报
回复
a.asp
<html>
<body>
<form action="b.asp" method="post">
<table>
<tr>
<td>字段1:</td>
<td><input type="text" name="field1" size=20>
</tr>
</table>
</form>
</body>
</html>

********************
b.asp
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("db1.mdb")

field1 = Request("field1")

Sql = "Insert into tablename(field1) values('" & field1 & "')"
Conn.Execute Sql,0,1
%>
<html>
<body>
<%
Sql = "Select * From tablename"
Set rs = Conn.Execute(Sql)

If rs.EOF then
Response.Write "空的!"
Else
I = 1
Response.Write "<table>"
While Not rs.EOF
Response.Write "<tr>"
Response.Write "<td>" & I & "</td>"
Response.Write "<td>" & rs("field1").value & "</td>"
Response.Write "</tr>"
I = I + 1
rs.MoveNext
Wend
Response.Write "</table>"
End If
%>
</body>
</html>
jyngress 2004-04-08
  • 打赏
  • 举报
回复
不是复杂的东西不好找呀
swich 2004-04-08
  • 打赏
  • 举报
回复
去网上找个源码吧

jyngress 2004-04-08
  • 打赏
  • 举报
回复
不好找谁帮帮我。
liuyingzi 2004-04-08
  • 打赏
  • 举报
回复
这个问题是最基本的,从网上随便下一个源代码提取一部分就可以了
jyngress 2004-04-08
  • 打赏
  • 举报
回复
没有太麻烦了,
还是请个高手几下帮我写出来算了。
jyngress 2004-04-08
  • 打赏
  • 举报
回复
帮我写个代码出来就是登记的,在网页中填写提交到数据库中在另一个页面显示出所有记录。
kanshangren 2004-04-08
  • 打赏
  • 举报
回复
呵呵,建议你去http://chinaz.com
huhanshan013 2004-04-08
  • 打赏
  • 举报
回复
楼主的意思还没有明白
jyngress 2004-04-08
  • 打赏
  • 举报
回复
还没有人写个代码出来呀简单问题呀。
jnyezhi 2004-04-08
  • 打赏
  • 举报
回复


给分吧 :-P

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧