difficulties in submitting listbox values to DB
I am having difficulties while submitting the listbox values which is being selected by the user to the DB.
The problem is that it is only inserting one value and ignores the other values.
The code is described below:
String name=request.getParameter("name"); String address= request.getParameter("address"); String username=request.getParameter("username"); query= insert into users values (name,address,usename) values (???) ps.setString(1,user); ps.setString(2,address); ps.setString(3,username);
The name and the address are text boxes and they are inserted properly in the DB, but the usernames are the listed values. When the user is selecting John, Mark, Edd. John will be inserted, but the other will not. Can you please help me with this issue.