Forum Moderators: coopster

Message Too Old, No Replies

a save button

is it possible to make?

         

someone

7:19 pm on Dec 15, 2004 (gmt 0)

10+ Year Member



Hi, i am thinking of making a photo gallery with php and mysql. The user will be able to search for photos based on keywords and browse by categories. The photos will be displayed in thumbnails format. Then when they click on the thumbnail, it will take them to a more detailed page displaying the photo size, the place where the photo is taken, etc. And I am thinking of having a "save" button/image there, when the user clicks on that button, they will be able to save the picture onto their computer. Something similar to when you click on an attached file from someone in your email message, and a box will come up asking you if you want to open it or save it.

I know the users can just right-click on the photo to save it, but I just thought that a "save" button would make it look cooler, if it's possible to make.

Thank You.

jatar_k

7:34 pm on Dec 15, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



sure it's possible, you link to a downloader type file. That would give them the 'save to' dialog and they could save it to their cpu.

There is information about file downloads on the header() [php.net] page.Take a look through the comments as well.

mincklerstraat

8:03 am on Dec 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A simpler way might be to use the HTTP_Download class at [pear.php.net...] , this will output the proper headers for you.