this code for edit data not for add data, problem with data editing. when i update the dropdown there is no problem but it doesn't change the value in the input, the second data comes in but the first one doesn't. when I add data there is no problem only when editing it
for ($i = 0; $i < $total; $i++) {
$id_jenispengujian = $id_user[0] . $nomor[0] . $jenis[$i];
$hasil = mysqli_query(konek::konekdb(), "INSERT INTO pemohon_uji
(id_jenispengujian,
jenis_pengujian,
jumlah_uji,
id_user,
no_surat) values
(
'$id_jenispengujian',
'$jenis[$i]',
'$jumlah[$i]',
'$id_user[0]',
'$nomor[0]'
)ON DUPLICATE KEY UPDATE
id_jenispengujian = '$id_jenispengujian',
jenis = '$jenis[$i]',
jumlah_uji = '$jumlah[$i]',
id_user = '$id_user[0]',
no_surat = '$nomor[0]'");
};
[enter image description here](https://i.stack.imgur.com/YC0Ha.png)
both arrays are inputted properly