title: How get the textbox values in array.....to store in database
body: <p>this is my code...</p>
  
  <p>How get the textbox array value to store in database...</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script type="text/javascript"&gt;
              var max = 4; //highest number to go to
              var currentIndex = 0;
              function btnClick() {
                  if(currentIndex &lt; max){
                      currentIndex++;
                      postClick();
                  }
              }
              function Previous(){
                  if(currentIndex&gt;0){
                      currentIndex--;
                      postClick();
                  }
              }
  
              function postClick() {//whatever you want to happen goes here
                  var sahans = new Array();
                  sahans[currentIndex] == d;
                  var d = document.getElementById("div");
                  d.innerHTML   = "&lt;p&gt;&lt;input type='text' name='name"+currentIndex+"[]'&gt;";
                  d.innerHTML  += "&lt;p&gt;&lt;input type='text' name='topic"+currentIndex+"[]'&gt;";
                  document.getElementById("div").style.display = ""; 
              }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form id="form1"&gt;
              &lt;div&gt;
                  &lt;input type="button" value="Previous" onclick="Previous();" /&gt;
                  &lt;input type="button" value="Next" onclick="btnClick();" /&gt;
                  &lt;div id="div"&gt;&lt;/div&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>