Question about how to do something. (Forms)

Results 1 to 2 of 2

Thread: Question about how to do something. (Forms)

  1. #1
    Join Date
    Dec 1969

    Default Question about how to do something. (Forms)

    I need some help in trying to accomplish something in my form. Its a bit complicated, so I&#039;ll do my best to explain it.<BR><BR>What I&#039;d like to do is delete database entries. I have a page with each entry available listed, and each has a checkbox which is named as box[number] (number is not in brackets, but I insert the entry&#039;s ID number here, so that a common entry might be: box23). This is within a form that currently has no action. I have a delete button which has an onClick event which sends the user to the next page, with an "action=delete" attached to the address.<BR><BR>How can I refer to selected boxes on the previous page. I need to find some way to refer to any box that exists (i don&#039;t have a set number of entries, or set names, so I need to have a way to search for checked boxes or something).<BR><BR>Does anybody have any ideas?<BR><BR>I think that was clear, but if it isn&#039;t let me know and I&#039;ll elaborate.<BR><BR>Mat

  2. #2
    Join Date
    Dec 1969

    Default Same name

    The easiest way to do this would be not to name the checkboxes differently but all the same and set the value of the checkbox to your id &#060;input name=box value=23&#062; or whatever. Then when you request.form("box") you will get a comma separated list of the ones which are checked, e.g. 23,45,88<BR>Then you can either just us IN in your select statement or you can convert it into an array to deal with the results.<BR>Does this work for your situation?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts