checkbox on the form

Results 1 to 3 of 3

Thread: checkbox on the form

  1. #1
    Join Date
    Dec 1969
    Posts
    1,671

    Default checkbox on the form

    I&#039m using asp to collect data from a web form and saves into a text file, later will import it into a database. One problem here, the form has MANY checkbox, and if it is not checked, then no information about that checkbox will be sent. The result is that, in the text file, almost each record will have different field numbers. How to import such a text file into a database if the field number is inconsistant? <BR><BR>Any suggestions will be greatly appreciated.

  2. #2
    B.H.Carr Guest

    Default RE: checkbox on the form

    You may want to create an intermediary ASP page that validates the form data, and then prepares it to be saved to the text file. This way you can check each field for valid content, make any necessary changes, then send the record to the text file that matches your database design.<BR><BR>Just a thought.<BR><BR>B.H.Carr

  3. #3
    Join Date
    Dec 1969
    Posts
    109

    Default RE: checkbox on the form

    How about storing the variable name along with the value in the file? That way you can store the variable name of each checkbox and if it has not been checked then the subsequent "field" in your file will be blank.<BR><BR>e.g. the file might looks like this (delimited by &#039&#124&#039)<BR><BR>checkbox1&#124Yes&#124chec kbox2&#124&#124checkbox3&#124No&#124checkbox4&#124 &#124checkbox5&#124&#124<BR><BR>You would need an array in the ASP the form gets submitted to that holds all the variable names.<BR><BR><BR>Oliver<BR>oliver@3waystreet.com< BR>

Posting Permissions

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