Jump to content

need some advice


jscix

Recommended Posts

Ok, what I want to know is, what is the best way to display a php generated image?

 

I have a script that generates the image but I need to display it on a page, so if I use a header command it will just redirect to the image without the page, correct?

 

So I made it generate a .JPG file, then print the HTML to display it, which works well EXCEPT, I want the script to delete the generated .jpg file after having either a successful form submission or a unsucessful form submission(And Generate a new one if form submission failed) which I got it to do..., BUT

 

the problem now is that if the user completly just LEAVES the page, without submitting at all.. the generated image stays in the directory.. which isn't a good thing.. How can I fix this? Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/38807-need-some-advice/
Share on other sites

Hrmm, I could.. I really want to make this script sulf-suffiecent though.

It isn't terribly important, as im just making this as a "learn by doing" kinda thing.

 

Thanks for the imput though, I think I just need to mess with it a bit more.

 

**bashes head on keyboard**

 

Link to comment
https://forums.phpfreaks.com/topic/38807-need-some-advice/#findComment-186564
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.