Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing many variables to image.php 2

Status
Not open for further replies.

elck

Programmer
Joined
Apr 19, 2004
Messages
176
Location
NL
Hi all.
I want to create a graph with loads of information.
How would you pass those variables to the image?

It seems that sessions do not work for images?

What I use now is something like this:

print "<img src='image.php?var1=1&var2=2....&var1020=1020' >";

but there is a limit to the number of variables that can be passed in this manner.
Do you guys (&galls) have any smart ideas?

 
You says sessions don't work. Can you elaborate >, they shoud as all your doing is requesting a page, its just outputs image/jpg rather than HTML.
 
could be a register_globals thing, is image.php aware of what the $_GET[] values are ?

Say if you just call what output if any do you get?


______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
I think you are both right here.

I had read something somewhere, then when I did not get the expected results I assumed that the <?header ("Content-type: image/png");?> destroyed the session variables.

In a new test file I get the desired result this way:

session_start();
$_SESSION['test']="a lot of data";

in the image.php this works fine:

session_start();
header ("Content-type: image/png");
[....]
imagestring ( $im, 4, 10, 10, $test,$black );

Thanks,ingresman and karver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top