I have this form
<tr role="row" class="odd">
<td>Category Name</td>
<td> <input type="text" value=""  class="form-control"  name="eids[<?php echo $id?>]"></td>
</tr>
And here is how i update
include "config.php";
foreach($_POST['eids'] as $key=>$value){ 
    $updateq=$conn->prepare("UPDATE  `table_name` SET table_row='$value' WHERE sn='$key'");
    $updateq->execute();
    }
When I submit let say three records ie(A,B,C) Table updated like this (C,C,C). Please help
 
    