<%
for i=1 to 5
title=request("title"&i)
content=request("content"&i)
conn.execute("insert into 琛ㄥ悕 (title,content) values ('"&title&"','"&content&"')")
next
%>

鎴栬

rs.open sql,conn,1,3
for i=1 to 5
title=request("title"&i)
content=request("content"&i)
rs.addnew
rs("title")=title
rs("content")=content
rs.update 
%>


缁欏彟涓涓柟娉曪細

<%
dim ka, frag, cnt, sql '瀹氫箟鍙橀噺
   sql="select * from cs" 'SQL鏌ヨ璇彞
   cnt=request.Form("ka").count '寰楀埌娣诲姞璁板綍鐨勬潯鏁
   set rs=server.CreateObject("ADODB.recordset") '鍒涘缓璁板綍闆
   rs.open sql,conn,1,3
   for i=1 to cnt '浣跨敤涓涓惊鐜鍙ュ悜璁板綍闆嗗啓鍏ユ暟鎹
   ka=request.Form("ka")(i) '灏嗚〃鍗曚紶閫掔殑鍊煎垎娆′紶閫掔粰鍙橀噺锛屾敞鎰忓悗闈㈢殑(i)涓瀹氫笉鑳藉皯銆
   frag=request.Form("frag")(i) '濡傛灉灏戜簡(i)锛屽氨涓娆℃ф妸鍊煎叏缁欎綘鍙橀噺銆
   rs.addnew '寮浣挎坊鍔
   rs("cs_ka")=ka
   rs("cs_d_f")=frag
   rs("cs_date")=date()
   rs.update '鎶婂璁板綍鐨勪慨鏀瑰啓鍏ユ暟鎹簱
   next '寰幆
   rs.close '鍏抽棴璁板綍闆嗛噴鏀捐祫婧
%>


浠ヤ笂灏辨槸asp 濡備綍鍚屾椂鎻愪氦澶氭潯璁板綍杩涜淇濆瓨鐨勮缁嗗唴瀹癸紝鏇村淇℃伅璇峰叧娉∣D浜戝叾瀹冪浉鍏虫枃绔狅紒



鏈枃URL锛http://www.odweb.cn/news_show.html?id=239