Jump to content

Archived

This topic is now archived and is closed to further replies.

hfarrah

How to pass data through an img src call to an image generating php script??

Recommended Posts

I am trying to call a chart generator php program through an img src statement and to specify an argument.  Can someone help with syntax?

The base call is <img src="chart.php> and I would like to send an array if possible.

Tjhanks,
Anthony

Share this post


Link to post
Share on other sites
<img src="chart.php?type=stats" />

Then have a PHP file parse $_GET['type'], generate image with GD and post headers respectively

Share this post


Link to post
Share on other sites
// image tag

[code]<img src='/script.php?data=<?=urlencode ( serialize ( $array ) );?>' alt='' />[/code]

// script.php

[code]$data = unserialize ( $_GET['data'] ); // but validate $_GET['data'] first (isset, ...)[/code]


me!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.