Create unlimited dynamic textbox and insert that value which is fill by user in database.how to do it in JSP, Servlet and Hibernate , MySQL
explanation:suppose i fill my name "David" in 1 textbox now i clik add more generate 1 text box fill in this "Chris" if wanna more addthn click more fill it and finnaly he wants submit thn insert all value of these dynamic textbox in database.
pls send solution how to do it

Welcome funwithme.

Please read How to post?.

You may use request.getParameterValues() method.

<%@ page language="java" %>

<%
    String []ar=request.getParameterValues("name");

    String cmd=request.getParameter("cmd");
    if(cmd==null) cmd=""; 
   if(cmd.equals("Submit")){
    for(int i=0;i<ar.length;i++) {
          out.println(ar[i]);
    } 
   }
%>

<form method="post" action="page3.jsp">

<br/><input type="text" name="name"/>
<br/><input type="text" name="name"/>
<br/><input type="text" name="name"/>
<br/><input type="text" name="name"/>
<br/><input type="text" name="name"/>
<br/> <input type="submit" value="Submit" name="cmd"/>
</form>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.