|
The $image variable within the condition was an example used for testing. You would replace that with however you get your image content (temporary file while uploading or from database).
If the GET parameter is set, yes, it will render itself as an image. It defaults to the else first so it displays the img tag, which requests itself along with a GET parameter based on your filename. (You would take out file_exists and put maybe !empty since it doesn't exist permanently.)
This was just to show one possible solution of how you could do it, which works in itself. You would need to modify it a little, probably passing whether it was from a temporarily uploaded file ($_FILES) or the database.
(Except with $_FILES, if you didnt want it permanent, I would probably either temporarily put it somewhere and get the info or put it into the database first and then get the info.)
|