<?php
// Set headers to force download of a CSV file
header('Content-Type: text/csv');
header('Content-Disposition: attachment; filename="sample_teachers.csv"');

// Open output stream
$output = fopen('php://output', 'w');

// Define CSV headers for teachers
$headers = ['Username', 'Email', 'Phone Number', 'Subject Taught', 'Class Assigned', 'Status'];

// Write headers to CSV
fputcsv($output, $headers);

// Optional: Add sample rows here for teachers
// fputcsv($output, ['TeacherJohn', 'john.t@example.com', '111-222-3333', 'Mathematics', 'JSS1,JSS2', 'active']);
// fputcsv($output, ['TeacherJane', 'jane.t@example.com', '444-555-6666', 'English', 'SSS1', 'active']);

// Close the output stream
fclose($output);
exit();
?>
