   [web] help
  Nevermind... got it[Edited by - _Acid on March 23, 2006 1:34:25 PM]
  The headers have to be the first thing sent to the browser. The thing I don't understand is, if you're trying to send an image, why do you have any HTML? I think what you need to do is have the script that creates the PNG in a separate file, then access it like you would a normal image file. <IMG SRC=pnggen.php> The pnggen.php file would create and display the image. If you needed to pass variables to the script, you could simply do this: <IMG SRC=pnggen.php?x=1&y=2>.   ;  What sercc said. You need to split out the parts that produce the image and the HTML code. Just use regular HTML image tags to call the PHP script that generates the image. Aside from using GET variables to pass data to the images, you can also rely on all other methods (like sessions or cookies). Just a little gotcha though: IE doesn't pass cookies to images when it's printing a page. Took me 3 hours of searching to find that out the hard way [grin].   