<!--#include file="../ p"--><html><head><title>帳號</title><style type="text/css"><!--............--></style></head><body><table width="400" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td height="50"><div align="center" class="style1">博佳網站管理帳號添加</div></td> </tr></table><table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="176" valign="top"><form name="form1" method="post" action=" p"> <table width="400" border="1" align="center" cellpadding="2" cellspacing="2" bordercolor="#CCCCCC"> <tr> <td width="122"><div align="right">登錄帳號:</div></td> <td width="258"><input name="uid" type="text" id="uid" value="zhao" size="20" maxlength="20"></td> </tr> <tr> <td><div align="right">登錄密碼:</div></td> <td><input name="pwd0" type="password" id="pwd0" value="mima" size="20" maxlength="20"></td> </tr> <tr> <td><div align="right">密碼確認:</div></td> <td><input name="pwd1" type="password" id="pwd1" value="mima1" size="20" maxlength="20"></td> </tr> <tr> <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center"> <input type="submit" name="Submit" value="添加確定"> </div></td> <td><div align="center"> <input type="reset" name="Submit2" value="取消添加"> </div></td> </tr> </table></td> </tr> <tr> <td height="34" colspan="2"><div align="right"> <%if trim(request.Form("uid"))=""or trim(request.Form("pwd0"))="" or trim(request.Form("pwd0"))="" thenresponse.write "輸入不能為空! "'response.endelseif trim(request.Form("pwd0"))<>trim(request.Form("pwd1")) thenresponse.write "登錄密碼必須與確認密碼相同! "'response.Endend if%> </div></td> </tr> </table> </form></td> </tr></table></body></html><%set rs= eateobject(" cordset")sqlstr="select * from admin_user where username='" & rm("uid") & "' and password='" & rm("pwd0") & "'"rs.open sqlstr,conn,1,1if cordcount >= 1 thenif rs("username")= rm("uid") thenResponse.Redirect " p?msg=此員帳號已被暫用,請選輸入其它名稱!"response.end oseend ifelseset rs= eateobject(" cordset")sqlstr="select * from admin_user"rs.open sqlstr,conn,3,3 dnewrs("username")= rm("uid")rs("password")= rm("pwd1")rs.updateend if%>我想實現的是一登錄進去用戶添加窗口,然后在表單中輸入用戶名和密碼后啟用ASP來檢驗輸入是否有問題,如果沒有問題就添加進數據庫。但是為什么我一瀏覽這個頁面時瀏覽器的狀態欄中一直顯示“已找到網站。正在等待回應”,但是一直進不去。我想請教各位大蝦,到底怎么了?誰能給我一個添加用戶的原碼給我參考。我這個代碼中到底有什么毛病,誰能幫我修復???

熱心網友

長時間停留在已找到網站。正在等待回應排除防火墻的阻攔外出現這個提示最大可能性就是數據庫連接出現問題.我看見你在開頭引用了 p文件,和服務器的連接就應該寫在這個文件里,但是,這個路徑似乎有點問題.前面有2個點../,這種格式肯定是錯的.似乎你是用frontpage修改或者保存過了的.這是frontpage最大的bug,偶爾會給形式如./的地址前面加一個.試圖改變conn的路徑.使用其他的文本編輯工具直接修改這里就可以 了其他的應該沒什么問題,沒仔細看,如果還有問題把錯誤報上來一起研究了.