Headers (' Content-type:image/jpeg ') and imagejpeg ($img) can output images, but there is no way to output other content at the same time, such as a paragraph,
If you use Imagejpeg ($img, ' path '), first save the image and then output to refresh the page.
What can be achieved: on the same page, with the form input parameters, using GD2 to make an image, and then output the image on this page, keep the content of HTML, do not refresh.
I novice, may problem level is lower, everybody haihan.
Reply to discussion (solution)
Imagejpeg ($img, ' path ');
Echo ';
Give it a try.
Package the image you need to output separately, the path can be http://www.example.com/action/method/
Add an image tag display to the HTML that you want to output at the same time.
......
Seems to only encapsulate, the second floor of the method to refresh to display the current page input data made of the chart.