While the city slept, Jan Nordgreen <room23111@hotmail.com> feverishly
typed:
[color=blue]
> 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=bookmarks.csv");
> $query = "SELECT * FROM bmbookmark";
> $result = mysql_query($query);
> while($row = mysql_fetch_row($result)){
> print implode(",", $row)."\n";
> };
> mysql_free_result($result);
> exit();[/color]
[...]
Do you really want the script to exit here? Or would you prefer it to carry
on and do the second csv file? ;-) If so, take out this first instance of
exit();
Cheers,
Nige
--
Nigel Moss.
Email address is not valid.
nigel@nigenetDOG.org.uk. Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!!
http://www.stopesso.com
In the land of the blind, the one-eyed man is very, very busy!