Jump to content

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


hfarrah

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
// 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!

Archived

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

×
×
  • Create New...

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.