<?php
header('Content-Type: text/csv');
header('Content-Disposition: attachment;filename="template_pemilih.csv"');

$output = fopen("php://output", "w");

// Tulis header (nama kolom)
fputcsv($output, array('no_pilih', 'nama', 'kelas', 'password'));

// Contoh data
// fputcsv($output, array('12345678', 'Nama Siswa', 'Kelas X-A', 'password123'));

fclose($output);
