I am using this code to create an image
Basically, to create dynamic image in HTML, you will need 2 PHP files:
Let's take a look how to do it:
You create image.php
that accept parameter, like: image ID or file name. For security reason, you HAVE to filter whatever parameter it get.
Why you have to do this? because, to generate image, you can't mix it with another HTML output. Let alone a single
space
orreturn
as this will render the image broken.
You do the HTML thing on another PHP, say test92.php
. To the HTML logic here, like: