difficulties in submitting listbox values to DB

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

  1. maas

    maas New Member

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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice