<?php
// api/csv_template.php  —  Download blank guest list CSV template
header('Content-Type: text/csv');
header('Content-Disposition: attachment; filename="guest-list-template.csv"');
$out = fopen('php://output', 'w');
fputcsv($out, ['name','email','phone','table','seat','category']);
// Sample rows
fputcsv($out, ['Olumide Fawehinmi','olumide@example.com','+2348012345678','1','A1','VIP']);
fputcsv($out, ['Adaeze Okonkwo','adaeze@example.com','+2348087654321','2','B3','Regular']);
fputcsv($out, ['Emeka Nwosu','','','3','','Press']);
fclose($out);
exit;
