<?php
require_once 'koneksi.php';

// Array user dan password baru
$users = [
    'admin01' => 'admin123',
    'guru01'  => 'guru123'
];

foreach ($users as $username => $password) {
    $hash = password_hash($password, PASSWORD_DEFAULT);
    $sql = "UPDATE users SET password = '$hash' WHERE username = '$username'";
    
    if (mysqli_query($koneksi, $sql)) {
        echo "Password untuk $username berhasil direset menjadi: $password<br>";
    } else {
        echo "Gagal reset $username: " . mysqli_error($koneksi) . "<br>";
    }
}
?>