<?php
$target_dir = "uploads/";
$filename = basename($_FILES["file"]["name"]);
$target_file = $target_dir . $filename;

if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) {
    // Redirect ke halaman pengecekan wajah
    header("Location: check.html?file=" . urlencode($filename));
    exit;
} else {
    echo "Upload gagal.";
}
?>
