Sorry if this is already available, but I can't find it!
Put very simply - I need a Save As.. dialogue.
I have a php script that generates a csv file of equipment, and I want to give the user the option of saving it to their local machine. Currently it saves to a set directory, but that has a major potential flaw - what happens when the system goes live, and two people access the page within a couple of milliseconds of each other?!? I don't want a "join the queue" system, nor do I want to risk corrupted files.
I'm sure there's a quick and easy way of doing this - can anyone please point me to it?
Cheers,
DMGF
Save As...
Moderator: General Moderators
-
DeadMeatGF
- Forum Newbie
- Posts: 2
- Joined: Tue Mar 01, 2005 6:32 am
- Location: Derby, UK
First post i found searching this forum - viewtopic.php?p=189000#189000
-
DeadMeatGF
- Forum Newbie
- Posts: 2
- Joined: Tue Mar 01, 2005 6:32 am
- Location: Derby, UK
I'll have a play with that one, but if I'm not mistaken (by looking at the code) it simply defines the page as a csv rather than an html page.
On the up side, that should invoke the "open or save" dialogue - on the down side I currently generate a table on-screen displaying what is in the csv, with a link to the csv file stored on the server. I'd like to keep it that way, but force the user to either store the file locally or use an option not to save the data at all.
Thanks for the quick response, and feel free to point out my fooloishness if I'm wrong - as I won't have chance to test it until late this afternoon!
On the up side, that should invoke the "open or save" dialogue - on the down side I currently generate a table on-screen displaying what is in the csv, with a link to the csv file stored on the server. I'd like to keep it that way, but force the user to either store the file locally or use an option not to save the data at all.
Thanks for the quick response, and feel free to point out my fooloishness if I'm wrong - as I won't have chance to test it until late this afternoon!