1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

difficulties in submitting listbox values to DB

Discussion in 'JSP' started by maas, Jul 2, 2010.

  1. maas

    maas New Member

    Jul 2, 2010
    Likes Received:
    Trophy Points:
    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:

    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.

Share This Page