Note

zhaozj2021-02-16  103

I want to do multiple Checkbox, each Checkbox corresponds to a record in the database. Then some submission buttons, the server deletes the selected record.

Checkbox I wrote this: value = "on"> where Cishu represents a record number. In the script, I pass the number in the database and then query Checkbox is on ON.

<% REM: This page is called by a Pay.asp. When the user clicks to delete the salary record, the salary record IF session ("CARD") ("CARD") ("CARD") ("CARD") ("") = "" "Error.asp? error = 002" END IF

Card = session ("card") SQL = "Select * from zhiyuanongzi where kahao = '" & card & "" set = conn.execute (SQL)

SQL2 = "delete from zhiyuanongzi where" flag = false

rs.movefirstdo while not rs.eof cishu = rs ("cishu") if request.form (cish "=" on "如果) If checkbox is selected if flag = false kil2 = SQL2 &" Cishu = '& Cishu & "" " Flag = true end if sql2 = SQL2 & "OR" SQL2 = SQL2 & "Cishu = '" & cishu & "" end if xi = "=mExtLoopConn.execute (SQL2) response.redirect" baseinfo.asp "%>

When performing this processing page, you always prompt the error type: Request object, ASP 0105 (0x80004005) array index.

Is Request.form (CISHU) = "ON" caused.

How did you do this requirement? It can also be roughly ideas.

转载请注明原文地址:https://www.9cbs.com/read-10547.html

New Post(0)