0

Hi,

I am using php and html and i am trying to make two buttons:
- Print button: that print a specific picture (not the whole page)
- Download button: which will display the save as window to save a picture.

Do you know if this is possible and how, should it be done?

thanks

3
Contributors
4
Replies
9
Views
5 Years
Discussion Span
Last Post by ko ko
0

1)Download button:

<form><input type="button" value="Download" onClick="window.location.href='your link'"></form>

2) print picture can be done using javascript :)

0

You must use HEADER with proper MIME type to prompt the download immediately when you click the download button. The above @tyson567 methods just send you the new page where the image located, it'll not prompt you to download the image when you reached that page. Here is the example for method 1. The method 2 can be done with Javascritp or jQuery plugin. You just need to google for that.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.