I have a html table with multiple rows with dynamic Id and name assigned. I want to retrieve the rows values in php. When I am doing the same, it is showing: undefined index error. The code is as below, pls help where I am wrong
<?php
if(isset($_POST["hdnsubmitted"]) 
{
for ($i=0;$i<6;$i++)
{
$curr_status=$_POST['curr_status'.$i]; echo $curr_status;
} 
$Status= "Status Updated";
}
 ?>
<form method="post" action="targetpage">
<table class="freeze-table">
     
        <thead>
           <tr >
            <th class="col-id-no fixed-header" >CURRENT STATUS</th>
            <th class="col-id-no fixed-header" >PENDING INPUTS</th>
             </tr>
          </thead>
       
    <?php
     $query="SELECT * FROM `status` WHERE 1";
            $sql=mysqli_query($conn,$query);
            $i=0;
            while ($row=mysqli_fetch_array($sql)){
            
                
            echo "<tr>
                  <td name='Curr_status'".$i."><div contenteditable>  ".$row['CURRENT_STATUS']."  </td>
                  <td name='Pending_Inputs'".$i."><div contenteditable>  ".$row['PENDING_INPUTS']."  </td>";
                    
             
   
          $i=$i+1;
          }
           
    ?>
  </tr>
    </table>
 <br>
    <button type="submit" name="btn_Update" class="btn_Update">Update</button>
    <p style="color:black;text-align: center"> <?php echo $Status; ?></p>
     </form>
 
    