hi,
Weedpacket wrote:This line
$word=$_SESSION['test']="blah";
is setting both $_SESSION['test'] and $word to "blah".
that's a dumb typo on my part ... sorry :-{
Weedpacket wrote:There is nothing different about strings being passed by session that makes them different from other strings.
Perhaps if you showed us some genuine code that illustrates the problem we'd have something more substantive to work on? Take what you have, remove as much irrelevant stuff as you can without changing the bug, and post what's left.
thx!.
two files, "test.php" and "imagegen.php", as follows ...
test.php:
<html><head></head><body>
<?php
session_start();
$_SESSION['test'] = 'blah';
?>
<img src="imagegen.php" />
</body></html>
imagegen.php:
<?php
$word=$_SESSION['test'];
//$word='bleep';
$txtFont = '/... path .../BOOKOSBI.TTF';
$myImage = imagecreatetruecolor(250,175);
$bgColor = ImageColorAllocate($myImage,225,225,225);
$txtColor = ImageColorAllocate($myImage,0,0,0);
imagefill($myImage, 1, 1, $bgColor);
imagefttext($myImage, 28, 0, 50, 100, $txtColor, $txtFont, $word);
header ("Content-type: image/png");
imagepng($myImage);
imagedestroy($myImage);
?>
case 1)
imagegen.php:
<?php
$word=$_SESSION['test'];
//$word='bleep';
result image --> [url]http://img205.imageshack.us/img205/5521/case17cb.png[/url]
case 2)
imagegen.php:
<?php
//$word=$_SESSION['test'];
$word='bleep';
result image --> [url]http://img205.imageshack.us/img205/8759/case27ef.png[/url]
cheers,
richard