标题:Access 的问题 求教
取消只看楼主
wrz1788
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2010-10-8
结帖率:50%
已结贴  问题点数:20 回复次数:1 
Access 的问题 求教
刚把注册页面和数据库连接做好 还挺高兴  自己试了试  悲剧了。。。。
注册也面的内容没有写入数据库 注册提交后 数据库u_id倒是在自动编号 可是u_code u_user 都是空的
搜索更多相关主题的帖子: Access 
2010-10-09 13:21
wrz1788
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2010-10-8
得分:0 
回复 2楼 yms123
<!-- #include file="db.inc.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>注册结果</title>
<style type="text/css">
<!-
body {
margin-top: 0px;
margin-bottom: 0px;
background-image: url();
background-repeat: no-repeat;
}
-->
</style></head>
<body>
<table width="800" border="0" align="center" cellspacing="0">
<tr>
<td width="218" height="72"> </td>
<td width="376"> </td>
<td width="200"> </td>
</tr>
<tr>
<td> </td>
<td align="center" valign="middle">
<%
set rst=server.CreateObject("ADODB.recordset")
set rst1=conn.Execute("insert into user (u_user,u_code) values ('" & request.Form("f_user") & "','" & request.form("f_code") & "')")
%>
<img src="img/zcsb.jpg" width="355" height="240" /><br>
<img src="img/zccg.jpg" width="357" height="229" /></td>
<td> </td>
</tr>
<tr>
<td height="154"> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>

这是注册结果的页面




<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>注册页面</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
background-image: url();
background-repeat: no-repeat;
}
.STYLE1 {color: #FF0000}
-->
</style></head>
<body>
<table width="800" height="597" border="0" align="center" cellspacing="0">
<tr>
<td height="597" align="center" valign="top" background="img/beijing.jpg"><table width="800" border="0" cellspacing="0">
<tr>
<td width="91" height="114">&nbsp;</td>
<td width="310">&nbsp;</td>
<td width="304" align="center" valign="bottom"><img src="img/zcym2.jpg" width="257" height="76" /></td>
<td width="87">&nbsp;</td>
</tr>
<tr>
<td height="74">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="322">&nbsp;</td>
<td colspan="2" bgcolor="#F9F9F9"><form id="form1" name="form1" method="post" action="result.asp"><table width="90%" border="1" align="center" cellpadding="5" cellspacing="0">
<tr>
<td colspan="3">请在下面填写您的注册资料,红色<span class="STYLE1">*</span>号所标示的选项为必填项</td>
</tr>
<tr>
<td width="24%" align="right">用户名:</td>
<td width="37%" align="left"><input name="f_user" type="text" id="f_user" /></td>
<td width="39%" align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right">密码:</td>
<td align="left"><input name="f_code" type="password" id="f_code" /></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right">姓名:</td>
<td align="left"><input name="f_name" type="text" id="f_name" /></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right">性别:</td>
<td align="left"><select name="f_sex" id="f_sex">
<option value="男" selected="selected">男</option>
<option value="女">女</option>
</select>            </td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right">年龄:</td>
<td align="left"><input name="f_age" type="text" id="f_age" size="8" /></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="submit" name="Submit" value="提交注册资料" />
&nbsp;&nbsp;&nbsp; <input type="reset" name="Submit2" value="重置表单" /></td>
</tr>
</table>
</form>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="69">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
这是注册页面   谢谢斑竹了
2010-10-09 16:02



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-322338-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.104412 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved