I have a prloblem I cannot solve I hope someone can help:

The client will click a link (link_A) that runs a php script that generates a jpeg file.
I wish to provide a means for the client to download the jpg file in an easy manner.

I'd prefer that link_A link directly to the Jpeg so the user can then just do a "save image as". To do that, I need to execute the php file first.

How to do this without requiring two click from user (1 to run php and one to view jpg file).

Thanks,
Doug

    Have the PHP script itself output the generated image (the examples given in the manual for [man]imagejpeg[/man] show an example of this).

      I am generating jpg file with php script.
      My issue is how to link to the jpeg. I cannot mix html with the php script that gens jpeg.

        crafter wrote:

        I cannot mix html with the php script that gens jpeg.

        I do not see why you need to output HTML code in the PHP script that generates the image. Whatever text you need to display can be displayed on the page that provides the link to the PHP script.

          Write a Reply...