第九課本地構(gòu)造表單來(lái)突破限制_第1頁(yè)
第九課本地構(gòu)造表單來(lái)突破限制_第2頁(yè)
第九課本地構(gòu)造表單來(lái)突破限制_第3頁(yè)
第九課本地構(gòu)造表單來(lái)突破限制_第4頁(yè)
第九課本地構(gòu)造表單來(lái)突破限制_第5頁(yè)
已閱讀5頁(yè),還剩17頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、第九地構(gòu)造表單來(lái)突破限制現(xiàn)在還有一些程序是本地驗(yàn)證的,何為本地驗(yàn)證的比如就是這樣的!-function ResumeError() return true;這種類(lèi)型為什么我叫它本地驗(yàn)證因?yàn)楸镜貏h掉它就可以提交啊如果是服務(wù)器上驗(yàn)證就沒(méi)有辦法了還是來(lái)看看今天要看的代碼還是 來(lái)看看老程序逍遙留言版啊進(jìn)入留言頁(yè)面看看這個(gè)頁(yè)面比較簡(jiǎn)單啊哈哈逍遙留言版 &;&;&;&; 它給的信息提交給 book_write.asp 這里主要是要看看 name 的值,如果不記得,就沒(méi)有辦法做下面的工作了您的: name 的值 UserName 它的最大值為 16*您的郵箱: name 的值為 User它的最大值為 50您

2、的:name 的值為 Url它的最大值為 100其它:(如、MSN 等)Name 的值為但是它的最大值限制了不能提交過(guò)多的數(shù)據(jù)。它的最大的長(zhǎng)度為 50留言?xún)?nèi)容:(200 字以?xún)?nèi)) name 的值為 Comments后面的就不分析了進(jìn)入 book_write.asp好了,請(qǐng)選擇表情:請(qǐng)選擇頭像:&;&;&;Copyright2005逍 遙 留 言 版htt別被這些代碼嚇得了應(yīng)該現(xiàn)在絕對(duì)沒(méi)有了現(xiàn)在為自己的 第一步而高興啊%if request(send)=ok thenusername=trim(request.form(username)過(guò)濾空格,與沒(méi)有關(guān)系啊 哈哈user=trim(reque

3、st.form(user)if username= or request.form(Comments)= thenresponse.write response.write alert(填寫(xiě)資料不完整,請(qǐng)檢查后重新輸入!);如果為空 就提示啊response.write location.href=javascript:history.go(-1);response.write response.endend ififchecktxt(request.form(username)request.form(username)then checktext 函數(shù)檢查一下response.write

4、如果有就提示response.write alert(您輸入的用戶(hù)名中含有字符,請(qǐng)檢查后重新輸入!);response.write location.href=javascript:history.go(-1);response.write response.endend ififyes=0 then郵箱為必填時(shí)檢查郵箱是否合法if checktxt(request.form(user)request.form(user) thenresponse.write 過(guò)濾了郵箱response.write alert(您輸入的箱中含有字符,郵請(qǐng)檢查后重新輸入!);response.write loc

5、ation.href=javascript:history.go(-1);response.write response.endend ififInstr(user,.)=0orInstr(user,)=0orlen(user)50 thenresponse.write response.write alert(您輸入的電子郵件地址格式不正確,請(qǐng)檢查后重新輸入!);response.write location.href=javascript:history.go(-1);response.write response.endend ifend ifif len(request.form(Co

6、mments)maxlength thenresponse.write 留言限制了不過(guò)與沒(méi)有很大的關(guān)系啊response.write alert(留言?xún)?nèi)容太長(zhǎng)了,請(qǐng)不要超過(guò)&maxlength&個(gè)字符!);response.write location.href=javascript:history.go(-1);response.write response.endend ifComments1=request.form(Comments)bad1=split(bad,/)過(guò)濾臟話(huà)for t=0 to ubound(bad1)Comments1=replace(Comments1,bad1(

7、t),*)nextif request.form(Comments)Comments1 thenresponse.write 過(guò)濾了response.write alert(出錯(cuò)了,您的留言包含提交的內(nèi)容!);response.write location.href=javascript:history.go(-1);response.write response.endend ifset rs=Server.CreateObject(ADODB.RecordSet) 把提交的數(shù)據(jù)放到數(shù)據(jù)庫(kù)里了sql=select * from Feedback where online=1 order by

8、tdate descrs.open sql,conn,1,3rs.Addnewrs(username)=Request(username)rs(comments)=Request(comments)rs(user)=Request(user)rs(face)=Request(face)rs(pic)=Request(pic)rs(url)=Request(url)看到?jīng)]有 沒(méi)有過(guò)濾rs()=Request()看到?jīng)]有 沒(méi)有過(guò)濾view=cstr(view)if view0 then view=1rs(online)=viewrs(IP)=Request.serverVariables(REMOTE_ADDR)rs.Updaters.closeset rs=nothingresponse.write if view=0 thenresponse.write alert(留言提交成功,留言須經(jīng)管理員審核才能發(fā)布。);elseresponse.write alert(留言提交成功,單擊“確定”返回留言列表!);end ifresponse.write location.href=index.asp;response.write response.endend i

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論