so i have this issue that it could only show the last 2 of the data. i have the same page using the code i made and it worked. but when i tried it on another page it only shows the last two of the data
// here is the excel file im using
gogogogo.xlsx
and here is the code i use:
// import data excel mulai baris ke-2 (karena baris pertama adalah nama kolom)
foreach ($Reader as $Key => $Row)
{
if ($Key < 5) continue;
$himpunan_id = fn_petik(str_replace('$','',$Row[1]));
$kelompok_id = fn_petik(str_replace('`','',$Row[2]));
$tanggal_daftar = fn_petik(str_replace('$','',$Row[3]));
$nama_lengkap = fn_petik(str_replace('$','',$Row[4]));
$jenis_kelamin = fn_petik(str_replace('$','',$Row[5]));
$no_hp = fn_petik(str_replace('$','',$Row[6]));
$tempat_lahir = fn_petik(str_replace('$','',$Row[7]));
$tanggal_lahir = fn_petik(str_replace('$','',$Row[8]));
$no_ktp = fn_petik(str_replace('$','',$Row[9]));
$alamat_lengkap = fn_petik(str_replace('$','',$Row[10]));
$email = fn_petik(str_replace('$','',$Row[11]));
$status = fn_petik(str_replace('$','',$Row[12]));
$remark = fn_petik(str_replace('$','',$Row[13]));
$sql = "INSERT INTO data_anggota SET
himpunan_id = '$himpunan_id',
kelompok_id = '$kelompok_id',
tanggal_daftar = '$tanggal_daftar',
nama_lengkap = '$nama_lengkap',
jenis_kelamin = '$jenis_kelamin',
no_hp = '$no_hp',
tempat_lahir = '$tempat_lahir',
tanggal_lahir = '$tanggal_lahir',
no_ktp = '$no_ktp',
alamat_lengkap = '$alamat_lengkap',
email = '$email',
status = '$status',
remark = '$remark',
created_by = '$created_by',
created_date = '$created_date'";
$rs = mysqli_query($koneksi, $sql);
so i have this issue that it could only show the last 2 of the data. i have the same page using the code i made and it worked. but when i tried it on another page it only shows the last two of the data
// here is the excel file im using
gogogogo.xlsx
and here is the code i use:
// import data excel mulai baris ke-2 (karena baris pertama adalah nama kolom)
foreach ($Reader as $Key => $Row)
{
if ($Key < 5) continue;
$himpunan_id = fn_petik(str_replace('$','',$Row[1]));
$kelompok_id = fn_petik(str_replace('`','',$Row[2]));
$tanggal_daftar = fn_petik(str_replace('$','',$Row[3]));
$nama_lengkap = fn_petik(str_replace('$','',$Row[4]));
$jenis_kelamin = fn_petik(str_replace('$','',$Row[5]));
$no_hp = fn_petik(str_replace('$','',$Row[6]));
$tempat_lahir = fn_petik(str_replace('$','',$Row[7]));
$tanggal_lahir = fn_petik(str_replace('$','',$Row[8]));
$no_ktp = fn_petik(str_replace('$','',$Row[9]));
$alamat_lengkap = fn_petik(str_replace('$','',$Row[10]));
$email = fn_petik(str_replace('$','',$Row[11]));
$status = fn_petik(str_replace('$','',$Row[12]));
$remark = fn_petik(str_replace('$','',$Row[13]));