The following code only generates the first csv file. The second
request is just ignored. What am I doing wrong? I am using Mozilla
Firefox, Windows XP, and Xampp.
<?php
require 'bm_connect.php ';
// export to csv file the table bmbookmark and call it bookmarks.csv
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename=bookma rks.csv");
$query = "SELECT * FROM bmbookmark";
$result = mysql_query($qu ery);
while($row = mysql_fetch_row ($result)){
print implode(",", $row)."\n";
};
mysql_free_resu lt($result);
exit();
// export to csv file the table bmcat and call it categories.csv
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename=catego ries.csv");
$query = "SELECT * FROM bmcat";
$result = mysql_query($qu ery);
while($row = mysql_fetch_row ($result)){
print implode(",", $row)."\n";
};
mysql_free_resu lt($result);
exit();
?>
Regards,
Jan Nordgreen
request is just ignored. What am I doing wrong? I am using Mozilla
Firefox, Windows XP, and Xampp.
<?php
require 'bm_connect.php ';
// export to csv file the table bmbookmark and call it bookmarks.csv
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename=bookma rks.csv");
$query = "SELECT * FROM bmbookmark";
$result = mysql_query($qu ery);
while($row = mysql_fetch_row ($result)){
print implode(",", $row)."\n";
};
mysql_free_resu lt($result);
exit();
// export to csv file the table bmcat and call it categories.csv
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename=catego ries.csv");
$query = "SELECT * FROM bmcat";
$result = mysql_query($qu ery);
while($row = mysql_fetch_row ($result)){
print implode(",", $row)."\n";
};
mysql_free_resu lt($result);
exit();
?>
Regards,
Jan Nordgreen
Comment