It didn'ti work ;-( Just showed a page with the data in!
How would I do it with a file in any case? Henry "Lallous" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Try this: > > <?php > $fileextension="csv"; > $filename="report"; > $fnsave = "$filename.$fileextension"; > > header("Content-disposition: filename=$fnsave"); > header("Content-type: application/force-download"); > > // generate your CSV content here and print them to the browser via ECHO > echo 'a,b,c,d,1'; > //......................... > > ?> > > Elias > > "Henry" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi All, > > > > I suspect this is a commonly asked question but; how do I generate a CSV > > files on the fly and get the browser to download it. > > > > Do I actually need to generate a file or can I just generate a variable > > contain the data that would be in the file? > > > > Any help is greatly appreciated. > > > > TIA > > > > Henry > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php