Jump to content
  • Advertisement
Sign in to follow this  
_Acid

[web] help

This topic is 4814 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
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>.

Share this post


Link to post
Share on other sites
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].

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!