Well,this is my code i tried to view the database table by putting the data in an array and looping into them: for($i=0;$i<count($fields);$i++){ echo "<th>". $fields[$i]->name."</th>"; } echo"</tr>"; while($records=mysqli_fetch_array($query,MYSQLI_NUM)){ echo"<tr>"; for($y=0;$y<count($records);$y++){ echo "<td>". $records[$y]."</td>"; PHP: no am trying to make an update page so,i dont know how to update each of the fields into the database?? do i have to declare each field alone instead of using an array