gd/form method/netscape refresh fun..
| From: | Kelly Meeks | Date: | Tue, 12 Dec 2000 20:51:10 +0000 |
| Subject: | gd/form method/netscape refresh fun.. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29955@lists.php.net to get a copy of this message | ||
Hey folks,
I'm experimenting with gd and php, and so far, so good.
I've created a form, that takes a users input then creates a graphic on the fly. The form page
(via post method) calls a page with the following code to create the image.
<?
header("content-Type: image/gif");
$id = ImageCreate($imagex,$imagey);
$imagecolor = ImageColorAllocate($id, $imagered, $imagegreen, $imageblue);
$textcolor = Imagecolorallocate($id,$fontred,$fontgreen,$fontblue);
imagerectangle($id,0,0,$imagex,$imagey,$black);
$bbox=imagettfbbox($fontsize,0,$fontface,$buttontext);
$start_x=($imagex/2)-(($bbox[0]+$bbox[2]+$bbox[4]+$bbox[6])/4);
$start_y=($imagey/2)-(($bbox[1]+$bbox[3]+$bbox[5]+$bbox[7])/4);
ImageTTFText($id,$fontsize,0,$start_x,$start_y,$textcolor,$fontface,$buttontext);
ImageGIF($id);
ImageDestroy($id);
?>
Everything works fine.
However, in netscape you have to hit reload to view the image. It works as it should in IE. If I
change the form method to Get, it works fine.
At the risk of showing my ignorance, anyone know why?
Kelly