Hii,
I am pretty new to the asp scripting language and am eager to learn. Currently I am practicing loops and arrays. While reading this tech book, I was asked a question that I am not able to find the answer for.
There is a SQL database that stores information about all the bestsellers in certain year. This database will receive forms from users and store the field information into its table columns accordingly. Now in the form, the user has an option to select which bestseller he/she has read. So the user has the option to select more than one checkboxes(i created tyhe form with my minimal html knowledge ). Now all the books that are selected by the user are going to be included into a table column as one string. However, i don't want to store it as a string. Therefore i am trying to split my string and store each book into an array( not sure if i can do that). In order to do this, i am using the split function. My problem is that, im not too sure how to store each of the books selected into the array. I want to try to make this process as dynamic as possible.
Here is what I thought of doing:
strList = Request("books") //stores the book list
bookListArray = Split(strList, "/,")
dim i
for i = 0 to ...//I dont know how to identify the last book that the user selected
bookListArray(i) = ...
Next
Hopefully Im clear enough!
Thxx!
I am pretty new to the asp scripting language and am eager to learn. Currently I am practicing loops and arrays. While reading this tech book, I was asked a question that I am not able to find the answer for.
There is a SQL database that stores information about all the bestsellers in certain year. This database will receive forms from users and store the field information into its table columns accordingly. Now in the form, the user has an option to select which bestseller he/she has read. So the user has the option to select more than one checkboxes(i created tyhe form with my minimal html knowledge ). Now all the books that are selected by the user are going to be included into a table column as one string. However, i don't want to store it as a string. Therefore i am trying to split my string and store each book into an array( not sure if i can do that). In order to do this, i am using the split function. My problem is that, im not too sure how to store each of the books selected into the array. I want to try to make this process as dynamic as possible.
Here is what I thought of doing:
strList = Request("books") //stores the book list
bookListArray = Split(strList, "/,")
dim i
for i = 0 to ...//I dont know how to identify the last book that the user selected
bookListArray(i) = ...
Next
Hopefully Im clear enough!
Thxx!