表单传值无效?还是SQL语句没执行?
yh235 2007-08-17 05:26:48 点删除或者是修改后一片空白 返回后发现没有被更改
不知道哪里有问题
以下是部分代码
=======================
表单:<form id="form3" name="form3" method="get" action="" style="float:left" >
<p></p><%do while not rs.eof or rs.bof %>
<p>类别:<input name="leibie" type="text" value="<%=rs("classname")%>" />
<a href="edit.asp?id=<%=rs("id")%>&action=edit">修改</a> <a href="edit.asp?id=<%=rs("id")%>&action=del">删除</a></p>
<%rs.movenext
loop
%>
</form>
======================
edit.asp:
<!--#include file="sub.asp" -->
<%
id=yh_replace(request.QueryString("id"))
classname=yh_replace(request.querystring("leibie"))
action=yh_replace(request.QueryString("action"))
if action=del then
open_conn.execute("delete from classname where id="&id)
response.Write("删除成功")
elseif action=edit then
open_conn.execute("update from classname (classname) values ('"&classname&"')where id="&id)
response.Write("更新成功")
end if
%>