Submit questions for asp checkboxes Expert help

Updated on technology 2024-02-09
17 answers
  1. Anonymous users2024-02-05

    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

  2. Anonymous users2024-02-04

    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.

  3. Anonymous users2024-02-03

    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.

  4. Anonymous users2024-02-02

    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!

  5. Anonymous users2024-02-01

    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.

  6. Anonymous users2024-01-31

    Floating at will is the right solution.

    Determine if this is null.,Just compare it with an empty character to know.。。。

  7. Anonymous users2024-01-30

    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

  8. Anonymous users2024-01-29

    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

  9. Anonymous users2024-01-28

    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.

  10. Anonymous users2024-01-27

    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!

  11. Anonymous users2024-01-26

    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.。

  12. Anonymous users2024-01-25

    If each box has a value, you can get the value first and then judge it.

  13. Anonymous users2024-01-24

    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

  14. Anonymous users2024-01-23

    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

  15. Anonymous users2024-01-22

    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!

  16. Anonymous users2024-01-21

    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.

  17. Anonymous users2024-01-20

    id = "user") 'Doesn't seem right?

    id = "user_id")'This should be it, right? Look below to see if it's the News ID

Related questions