title: How to use single form for editing data in ajax?
body: <p>I am working on a project which uses codeigniter framework. I am able to display all data from database into a table. What I did is loop the result and every row has its edit link. Now, the problem is everytime I load the page, all edit links are forms loaded at the same time. For example, when I have more than a hundred data from the DB, hundred edit forms also looping which I think not good for the system because of its heaviness. What I plan is to use a single form and just pass the data using ajax. Can anyone know how to do it? I just need some guidance. Thanks in advance.</p>
  
  <p>EXAMPLE CODE:</p>
  
  <pre><code>&lt;?php foreach ($users as $key =&gt; $value): ?&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;?php echo $value['first_name'] ?&gt;&lt;/td&gt;
   &lt;td&gt;&lt;?php echo $value['last_name'] ?&gt;&lt;/td&gt;
   &lt;td&gt;
    &lt;a href="#" data-toggle="modal" data-target="#update_user_modal&lt;?php echo    $value['id'] ?&gt;" id="view-profile" title="Click to view"&gt;
     &lt;i class="icon-doc"&gt;&lt;/i&gt;
    &lt;/a&gt;
   &lt;/td&gt;
  &lt;/tr&gt;
  &lt;?php endforeach ?&gt;
  </code></pre>