My script imageoutput.php reads a couple arrays from a form with an action of imageoutput.php-- but the snippet of code I'll post here doesn't have any of that--- it would just make a basic outline- but you get the idea.
<?php
//imageoutput.php
//header
Header("Content-Type: image/gif");
//make initial white background from file
$im = imagecreatefromgif("graph.gif");
//assign rgb values
$white = ImageColorAllocate($im, 255, 255, 255); //bgcolor
$black = ImageColorAllocate($im, 0, 0, 0);
$gray = ImageColorAllocate($im, 204, 204, 204);
$red = ImageColorAllocate($im, 153, 0, 0);
$blue = ImageColorAllocate($im, 51, 51, 153);
// make initial graph outline
ImageRectangle ($im, 0, 0, 700, 500, $black);
// make initial gray outline
ImageFilledRectangle ($im, 50, 37, 650, 471, $gray);
//send to browser
ImageGif($im);
// buh bye
ImageDestroy($im);
?>
that sends it to the browser fine, but it wont print... nothing else is sent to the client except the gif