1,前台页面:
input.asp:
<link href="/feedback/css/style.css" rel="stylesheet" type="text/css" />
<form action="/feedback/save.asp" method="post">
<div class="feeedback_bd">
<div class="feedback_block">
<div class="feedbck_top">东莞市众镁五金制品(镁合金压铸)有限公司 - 欢迎你</div>
<div class="feedback"><ul>
<li>姓名:<input name="name" type="text"/></li>
<li><input name="sex" type="radio" value="0"> 男 <input name="sex" type="radio" value="1"> 女</li>
<li>邮箱:<input name="youxiang" type="text"/></li>
<li>电话:<input name="tel" type="text"/></li>
<li>地址:<input name="address" type="text"/></li>
</ul></div>
<div class="feedback_message">
<textarea name="message" cols="50" rows="10"></textarea>
</div>
<div class="button"><input name="submit" type="submit" value="提交"> <input name="cancel" type="button" value="取消"></div>
</div>
</div>
</form>
样式文件style.css:
/* CSS Document */
.feeedback_bd{ margin:0px; padding:0px;}
.feedback_block{ text-align:left; border-left:1px solid #000; border-right:1px solid #000; border-bottom:1px solid #000; padding-bottom:10px;}
.feedbck_top{}
.feedback{}
.feedback ul{}
.feedback ul li{}
.feedback_message{ margin-left:20px;}
.button{ text-align:center;}
2,代码部分save.asp:
<!--#include file="data.asp"-->
<%
Dim name,sex,yx,tel,address,message
name=request("name")
sex=request("sex")
yx=request("youxiang")
tel=request("tel")
address=request("address")
message=request("message")
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from feedback"
rs.open sql,conn,1,3
rs.addnew
rs("name")=name
rs("sex")=sex
rs("yx")=yx
rs("tel")=tel
rs("address")=address
rs("message")=message
rs.update
rs.close
%>
<script>
<!--
alert("提交成功!");
location.href="../feedback.asp";
//当点确定后跳至以上地址
-->
</script>
<%
'Response.Redirect "../feedback.asp"
conn.close
set conn=nothing
%>