title: Generating text box in php and codeigniter
body: <p>I want to dynamically generate a row of text boxes in a table when clicking a button.For example i have  a table to enter the list items.When i click add button, a new row is inserted into the table.Can you please help me.I am working on php and codeigniter..</p>
  
  <p>The foolowing is the script which I have used for generating the row.</p>
  
  <pre><code>&lt;SCRIPT language="javascript"&gt;
  function changeIt()
  {
  var i = 1;
  my_div.innerHTML = my_div.innerHTML +"&lt;br&gt;&lt;input type='text' name='mytext'+ i&gt;"
  
  i++;
  }
  &lt;/SCRIPT&gt;
  
  &lt;table align="center" name="table"&gt;
  &lt;tr&gt;
  &lt;td&gt;Code&lt;/td&gt;
  &lt;td&gt;Name&lt;/td&gt;
  &lt;td&gt;Quantity&lt;/td&gt;
  &lt;td&gt;Price&lt;/td&gt;
  &lt;INPUT type="button" value="Add" onclick="changeIt()"/&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;div id="my_div"&gt;
  &lt;table&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>This only generates one text box at a time. I need to display more that one text box in a row?</p>