Include special page content into another page

Hi, I have a page graph.php where I have drawn a graph using highcharts.js.

I want to include that graph in another page. Can I use <img src=“graph.php”> ? Please suggest me the right of embedding in any page.

Thanks all.

HI there,

Why don’t you just use the include() function to include the script?

Wherever you want the graph to display, just include it:


include("graph.php");

Depends where the graph.php is located relative to the calling script to determine the path of the file.

Kind regards,

cL.

I belive you can call the routine as you first posted, as the src element of an img tag, as long as the only thing your php routine returns is an image. I haven’t tried this with php, but used it for displaying captcha images.