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

1)Download button:

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

2) print picture can be done using javascript :)

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.

thankyou both for your help. it worked for me.

Solved ? Marked it as Solved then.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.