Page 1 of 1

Prompt to a JPG

Posted: Mon Jun 05, 2006 6:10 am
by powerPT
HI!

Can someone else tell me how: Click on a link in text, url is a jpg file and appears a prompt to download?
The usually is the jpg opens a browser window but I don“t want this.

Posted: Mon Jun 05, 2006 6:32 am
by ok
I don't understand you???

But maybe that is what you wanted:

Code: Select all

<a href="page1.html" title=""><img src="img.jpg" alt="my_pic"></a>

Posted: Mon Jun 05, 2006 6:33 am
by Weirdan

Posted: Mon Jun 05, 2006 6:44 am
by Chris Corbyn
Usually just these two headers will suffice.

Code: Select all

header('Content-Diposition: attachment; filename=myfile.jpg');
header('Content-Type: image/jpeg');