[PHP] Delete a file immediately after download

2005-02-15 Thread Shaun
Hi, I have a database that contains encrypted data using Mysql function ENCODE(). Certain users will be allowed to view this data and I will allow them to download a CSV file contain the decrypted data using the Mysql DECODE() function. However I don't want this file to be left on the server,

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Matt M.
I have a database that contains encrypted data using Mysql function ENCODE(). Certain users will be allowed to view this data and I will allow them to download a CSV file contain the decrypted data using the Mysql DECODE() function. However I don't want this file to be left on the server, is

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Shaun
Hi Matt, Thanks for the reply, I know how to delete a file I just wanted to know if its possible to ensure that its deleted automatically as soon as the user has downloaded it. Thanks... Matt M. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have a database that contains

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Richard Lynch
Shaun wrote: Thanks for the reply, I know how to delete a file I just wanted to know if its possible to ensure that its deleted automatically as soon as the user has downloaded it. Yes. You don't even put the file into your web tree DocumentRoot directory, and you write a PHP script that

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Richard Lynch
Matt M. wrote: I have a database that contains encrypted data using Mysql function ENCODE(). Certain users will be allowed to view this data and I will allow them to download a CSV file contain the decrypted data using the Mysql DECODE() function. However I don't want this file to be left on

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Bret Hughes
On Tue, 2005-02-15 at 14:00, Richard Lynch wrote: Matt M. wrote: I have a database that contains encrypted data using Mysql function ENCODE(). Certain users will be allowed to view this data and I will allow them to download a CSV file contain the decrypted data using the Mysql DECODE()

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Marek Kilimajer
Shaun wrote: Hi, I have a database that contains encrypted data using Mysql function ENCODE(). Certain users will be allowed to view this data and I will allow them to download a CSV file contain the decrypted data using the Mysql DECODE() function. However I don't want this file to be left on

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Shaun
Hi Marek, Thanks for your reply, could you tell me how I would go about this please? Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Shaun wrote: Hi, I have a database that contains encrypted data using Mysql function ENCODE(). Certain users will be allowed to

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Marek Kilimajer
Shaun wrote: Hi Marek, Thanks for your reply, could you tell me how I would go about this please? Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Shaun wrote: Hi, I have a database that contains encrypted data using Mysql function ENCODE(). Certain users will be

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Jason Barnett
Shaun wrote: Hi Marek, Thanks for your reply, could you tell me how I would go about this please? ?php header('Content-type: text/csv'); header('Content-Disposition: attachment; filename=download.csv'); /** Now you perform the MySQL query, DECODE the information and echo it to the screen.

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Richard Lynch
Shaun wrote: Hi Marek, Thanks for your reply, could you tell me how I would go about this please? ?php require 'connect.inc'; $query = select * from whatever; $data = mysql_query($query); while ($row = mysql_fetch_row($data)){ echo implode(\t, $data), \n; } ? You can muck