数据库能连上,里面的信息可以显示在web里,但是留言板和注册的信息确不能写入数据库里!
这是什么原因呢?代码如下!
注册的:
<P align="center" class=style6><br>
用户名</P>
</div></td>
<td width="710" valign="top">
<div align="left">
<form name="form1" method="POST" action="<%=MM_editAction%>">
<br>
<input type="text" name="textfield">
<input type="hidden" name="MM_insert" value="form1">
</form>
</div></td>
<td width="16" rowspan="9" background="../image/myweb_04.gif"> </td>
</tr>
<tr>
<td height="30" valign="top"><div align="center" class="style6">密码</div></td>
<td valign="top"><form name="form2" method="POST" action="<%=MM_editAction%>">
<input type="password" name="textfield">
<input type="hidden" name="MM_insert" value="form2">
</form></td>
</tr>
<tr>
<td height="30" valign="top"><div align="center" class="style6">确认密码</div></td>
<td valign="top"><form name="form3" method="POST" action="<%=MM_editAction%>">
<input type="password" name="textfield">
<input type="hidden" name="MM_insert" value="form3">
</form></td>
</tr>
<tr>
<td height="30" valign="top"><div align="center" class="style6">Email</div></td>
<td valign="top"><form name="form4" method="POST" action="<%=MM_editAction%>">
<input name="textfield" type="text" size="40">
<input type="hidden" name="MM_insert" value="form4">
</form></td>
</tr>
<tr>
<td height="30" valign="top"><div align="center" class="style6">昵称</div></td>
<td valign="top"><form name="form5" method="POST" action="<%=MM_editAction%>">
<input name="textfield" type="text" size="25">
<input type="hidden" name="MM_insert" value="form5">
</form></td>
</tr>
<tr>
<td height="30" valign="top"><div align="center" class="style6">从事事业</div></td>
<td valign="top"><form name="form6" method="POST" action="<%=MM_editAction%>">
<input name="textfield" type="text" size="20">
<input type="hidden" name="MM_insert" value="form6">
</form></td>
</tr>
<tr>
<td height="30" valign="top"><div align="center" class="style6">收入水平</div></td>
<td valign="top"><form name="form7" method="POST" action="<%=MM_editAction%>">
<select name="select">
<option selected>1000以下</option>
<option>1000-2000</option>
<option>2000-3000</option>
<option>3000-4000</option>
<option>4000-5000</option>
<option>5000-6000</option>
<option>6000-7000</option>
<option>7000-8000</option>
<option>8000-9000</option>
<option>9000-10000</option>
<option>10000以上</option>
</select>
<input type="hidden" name="MM_insert" value="form7">
</form></td>
</tr>
<tr>
<td height="30" valign="top"><div align="center" class="style6">身份证号</div></td>
<td valign="top"><form name="form8" method="POST" action="<%=MM_editAction%>">
<input name="textfield" type="text" size="40">
<input type="hidden" name="MM_insert" value="form8">
</form></td>
</tr>
<tr>
<td height="30" valign="top"><div align="center" class="style6">从何处得知本网站</div></td>
<td valign="top"><form name="form9" method="POST" action="<%=MM_editAction%>">
<input name="textfield" type="text" size="40">
<input type="hidden" name="MM_insert" value="form9">
</form></td>
是不是少了什么东西!这个解决了,我想其他的我照样改下就可以了!麻烦看看!
还有登录判断一直出错,说帐号为空!
代码如下,有蝈蝈说没有输入就判断了!要如何改呢!
<!--#include file="../Connections/first.asp" -->
<%
dim name,password
name=request.form("name")
password=request.form("password")
if name="" then
%>
<script language=javascript>
alert("帐号为空");
location.href="首页.asp"
</script>
<% end if %>
<% if password="" then
%>
<script language=javascript>
alert("密码为空");
location.href="首页.asp"
</script>
<% end if %>
<% set rs=server.createobject("adodb.recordset")
%><title>注册判断</title>
rs.source "select * from information where name='"&name&"'",conn,1,3
rs.open
if not rs.eof then
if password=rs("password") then
session("name")=name
Response.write("<script>location.href('登陆成功.asp')</script>" )
else
response.write ("<script>alert('用户密码错误');location.href('denglu.asp')</script>")
end if
end if
if rs.eof then
response.write ("<script>alert('用户帐号错误');location.href('denglu.asp')</script>")
end if
set rs=nothing
rs.close
[此贴子已经被阳光白雪于2007-5-24 14:52:14编辑过]