954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Insert Dynamic Textbox Value In Database...

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

funwithme
Newbie Poster
1 post since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

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>
__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You