export trainings

This commit is contained in:
Tóth Richárd
2019-12-04 22:09:55 +01:00
parent ce25f41a44
commit 0dcae384dd
6 changed files with 147 additions and 50 deletions

View File

@@ -34,8 +34,8 @@ $userAssocArray = $sql->assoc_array("
$filename = "taglista.csv";
$fp = fopen('php://output', 'w');
fputcsv($fp, array_keys(reset($userAssocArray)), ';');
ob_end_clean();
fputcsv($fp, array_keys(reset($userAssocArray)), ';');
header('Content-type: application/csv');
header('Content-Disposition: attachment; filename='.$filename);
@@ -43,3 +43,4 @@ header('Content-Disposition: attachment; filename='.$filename);
foreach($userAssocArray as $row) {
fputcsv($fp, $row, ';');
}
exit(1);