Go4Expert (http://www.go4expert.com/)
-   JSP (http://www.go4expert.com/forums/jsp/)
-   -   difficulties in submitting listbox values to DB (http://www.go4expert.com/forums/difficulties-submitting-listbox-values-t22615/)

maas 2Jul2010 12:57

difficulties in submitting listbox values to DB
Hello All,

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:

PHP Code:

String name=request.getParameter("name"); String addressrequest.getParameter("address");  String username=request.getParameter("username");       queryinsert into users values (name,address,usenamevalues (???)   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.

All times are GMT +5.5. The time now is 15:48.