Re: Downloading Data from Database
| From: | David Robley | Date: | Thu, 12 Jul 2001 01:29:51 +0000 |
| Subject: | Re: Downloading Data from Database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57527@lists.php.net to get a copy of this message | ||
On Sat, 14 Jul 2001 00:40, Randy Johnson wrote:
> I am adding a feature to my site where members can download their
> information from the database. What is the best way to accomplish
> this?
>
> Create a text file every time a member wants to download their info?
> I thought about this ..how would I handle deleting the text files when
> I was finished and what would prevent others from downloading the file?
>
>
> I read somewhere that files can be created on the fly or dynamically
> anytime a download takes place. This sounds like a good idea cause
> there wouldn't be any files on the server. Any idea where I can get
> more info on that?
>
> Thanks
>
> Randy
try this:
header("Content-disposition: filename=maillist.dat");
header("Content-type: application/octetstream");
header("Pragma: no-cache");
header("Expires: 0");
//query database
//echo results required
//end
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
[incredibly rude and childish comments deleted]