RE: [PHP] Re: Downloading Data from Database
| From: | Randy Johnson | Date: | Sat, 14 Jul 2001 15:45:08 +0000 |
| Subject: | RE: [PHP] Re: Downloading Data from Database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57581@lists.php.net to get a copy of this message | ||
Dave,
The code below gives me an error in IE 5.+
Here is the error:
IE cannot download ......blah blah try again later
Do you use this code on your site or do i just need to tweak it
-----Original Message-----
From: David Robley [mailto:huntsman@www.nisu.flinders.edu.au]
Sent: Wednesday, July 11, 2001 6:30 PM
To: Randy Johnson; PHP General List
Subject: [PHP] Re: Downloading Data from Database
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]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net