Ik gebruik volgend script om te exporteren naar een CSV bestand, maar nu krijg ik heel erg leuke foutmeldingen. Wie zou mij kunnen helpen???
[foutmelding]
Warning: Cannot add header information - headers already sent by (output started at /home/wwwppl/s253081/html/EFACT/Admin/export.php:5) in /home/wwwppl/s253081/html/EFACT/Admin/export.php on line 6
Warning: Cannot add header information - headers already sent by (output started at /home/wwwppl/s253081/html/EFACT/Admin/export.php:5) in /home/wwwppl/s253081/html/EFACT/Admin/export.php on line 7
[/foutmelding]
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| <?php
include("../config.php");
?>
<?php
header("Content-type: application/ms-excel; name=inschrijvingen.csv");
header("Content-Disposition: inline; filename=inschrijvingen.csv");
$sql = "SELECT * FROM congres_inschrijvingen";
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_object($res)) {
$tekst =
$tekst."$row->ANR,$row->Naam,$row->Voorletters,$row->Adres,$row->Postcode,$row->Plaats,$row->Email,$row->Bankgiro,$row->Telefoonthuis,$row->Geslacht,$row->Instituut,$row->Soort,$row->Middag1,$row->Middag2\n";
}
print $tekst;
exit();
?> |
[foutmelding]
Warning: Cannot add header information - headers already sent by (output started at /home/wwwppl/s253081/html/EFACT/Admin/export.php:5) in /home/wwwppl/s253081/html/EFACT/Admin/export.php on line 6
Warning: Cannot add header information - headers already sent by (output started at /home/wwwppl/s253081/html/EFACT/Admin/export.php:5) in /home/wwwppl/s253081/html/EFACT/Admin/export.php on line 7
[/foutmelding]