-
Below is saved as.
set conn="")
love="love")
exec="insert into youlove(love)values('"+love+"')"
execset conn=nothing
Record added successful!"
This is the most straightforward way to write, if you want to separate them, you need to create a few more field names.
If you don't understand, welcome the letter
-
The name should be different, e.g. love1, love2, love3
In this way, in the asp file that receives the information, use a for statement to take the value.
-
If you have a field in your database to store this hobby, then directly"love"And then just put it into storage.
If it's separate:
with"love") to get the input value, use split("love"),",") into an array, and then iterate over the array and put it into the library separately.
-
strlove = "love")
If checked"Listen","Read a book","Sleep", then the value of strlove will be.
Listen, read, sleep.
You can use a field in the database to identify the selected item!
-
I don't know if"things"<>1 or 2 or 3 or 4 or 5 then can this still be written?If there are many conditions, it is best to use select case.
-
Floating at will is the right solution.
Determine if this is null.,Just compare it with an empty character to know.。。。
-
The first?How to write here) No need to write anything.
The second?How to write ??? here
Write on rs ("The name of the field") = trim(request("like"))
set rs=nothing
end if
-
The like you get is a list string.
like = "like")
Assuming the user chooses three, the likes obtained should be "long-distance running, football, blue ball".
You can save this string directly into the database.
The mark-southidc in this is changed to mark=southidc, and when the submission is processed:
if "mark") = "southidc" thenlike = replace("like")," ","")"insert into tablename(like) values('"&like&"')") 'This sentence can also be done with rs.
end if
-
The name of your checkbox is static, and of course name= is selected for all of them"<%=friendid%>"
Bring the following button to the end of each category with the argument)."> put sel at the end
function sel(id) Add judgment checkbox name = id is sel (id) This function needs to be changed.
with"id") to get all elements with name id.
-
When there is more than one checkbox, the format of the data sent to the asp page is that the selected checkbox values are separated by ",", so you need to use the vbs function on the acceptance page to convert the received parameters to an array. And then recycle it!
-
I have a way, but don't know if it solves your problem, in dw, build two pages and.
Next, insert a form form1 on this page, select action to insert a few checkboxes in form form1, for example, insert only two checkboxes, name "cb1" and "cb1" respectively"cb2", the details are as follows:
In use. %= "cb1"))
= "cb2"))
This way, after you select the checkbox from it and click submit, it will be displayed in .
Note,Don't see**,Just a headache,These**are generated by yourself when you use DW operation,In order to learn well,It's best to be familiar with these**,This will help you a lot.。
-
If each box has a value, you can get the value first and then judge it.
-
Since it's a deletion, why split the obtained value, just use in can't it? Also, the way you got the checkbox is wrong.
The page is as follows:
news_id = "news_id") 'Here you can directly get the checkbox value in the form of the previous page, in the form of 1, 2, 3.
if isnull(news_id) or news_id="" then
The parameter is empty or not a valid parameter"
else to delete.
end if
-
When there is more than one checkbox selected, the id (that is, the address of the mail) will appear after a small bean you have a problem with this paragraph, note the 4th line idarr=split(idlist), this is not right, split
-
On the form page, you only have a checkbox name=news id, and after submitting the form, you use id ="user")
This user is in **?
Furthermore, even if there is this form item, I don't see your assignment, the reason: I didn't get the corresponding parameters;
Suggestion: Add a hidden field to the form, click Select All, JS changes the checkbox status to selected, and at the same time, obtains the value of each checkbox, combines them and uses them, separated by numbers, and assigns the value to the hidden field; The processing page gets the value of the hidden field and divides it according to the , and then deletes it with a delete statement in a loop!
-
Your**,I took a look.,It's nothing more than deleting.,I did it.,It has nothing to do with your program.,But you can refer to it.。 Please refer to it carefully, and in combination with your program, it should be solved. And oh.
You need to look at the fields in your database and the way SQL statements are written, and don't put errors in these places, otherwise it will be difficult for you to find the errors in **.
asp**:--
if "submit") = "Delete the selection" thenif request("id") = "" then""
end if
sql = "delete from table.
sql )set conn = nothing
end if
Please add the above ** to the appropriate place in your program. Then test it out.
-
id = "user") 'Doesn't seem right?
id = "user_id")'This should be it, right? Look below to see if it's the News ID