Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] help

Started by _Acid Jun 12, 2005 at 10:58 PM 1 replies 950+ views
Original Post
_Acid
_Acid
Nevermind... got it [Edited by - _Acid on March 23, 2006 1:34:25 PM]
Best signature ever.
Sercc
Sercc
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. The pnggen.php file would create and display the image. If you needed to pass variables to the script, you could simply do this: .
Sander
Sander
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].

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.