日期:2014-05-17  浏览次数:21015 次

asp修改的(saveedit.asp)无法接收edit.asp传来的id。
当updata的是时候,数据库里面的东西全部改掉了。
下面是代码edit.asp

<form   id= "form1 "   name= "form1 "   method= "post "   action= "saveedit.asp ">
    <p> &nbsp; </p>
    <table   width= "360 "   height= "95 "   border= "1 ">
        <tr>
            <td   width= "69 "> 修改名字 </td>
            <td   width= "275 "> <label>
                <input   name= "name "   type= "text "   id= "name "   />
            </label> </td>
        </tr>
        <tr>
            <td> 修改姓名 </td>
            <td> <label>
            <input   name= "qq "   type= "text "   id= "qq "   />
            </label> </td>
        </tr>
        <tr>
            <td   colspan= "2 "> 内容
                <label>
                <textarea   name= "content "   cols= "30 "   rows= "5 "   id= "content "> </textarea>
            </label> </td>
        </tr>
    </table>
    <p>
        <label>
        <input   type= "submit "   name= "Submit "   value= "提交 "   />
        </label>
        <label>
        <input   type= "reset "   name= "Submit2 "   value= "重置 "   />
        </label>
    </p>
</form>

下面是saveedit.asp

<%     id=( "id ")
name1=request.Form( "name ")
qq1=request.Form( "qq ")
content1=request.Form( "content ")
response.Write(name1)
response.Write(qq1)
response.Write(content1)
set   rs=conn.execute( "update   list2   set   name= ' "&name1& " ',qq= ' "&qq1& " ',content= ' "&content1& " '   where   id   = "&id)

response.Write( "update   ok ")
%>

请指教,在此先谢谢各位!

------解决方案--------------------
edit.asp
<input type= "submit " name= "Submit " value= "提交 " />
</label>
<label>
<input type= "reset " name= "Submit2 " value= "重置 " />
<input type= "hidden " name= "id " value= " <%=rs