English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How can i add a selected values to MySQL database using JSP. I tried to add but it is saving only the first selected values. Can anyone resolve this....

2006-09-11 00:52:49 · 4 answers · asked by Venkat 2 in Computers & Internet Programming & Design

4 answers

In JSP, as in any other language, you only need to go through the array adding the values to the database. As you mentioned that the problem is that only the first value is being added I assume that the problem is in the HTML code. When using multiple options you must append brackets "[]" at the end of the control's name. e.g.: