Tutorial: How to make an Image Upload and Thumbnailer Script PHP
5. The last section to this tutorial. After the html form on the same page thumbs.html i added this:
-
<img src="<?php echo 'thumbs/'.$filename; ?>" alt="" />
-
Link:
-
<input type="text" value="<?php echo $urltothumbs.$filename; ?>" />
What this does is see if the variable $success is a 1 or a 0; if it is true or false. If it is true, that means the file creation worked and we can display it. So what it does it makes a html img placeholder with the filename in the source. This shows the image on the page nicely. Next up is a simple text field where people can copy the uploaded image's link and give it to friends.

3 Responses to “Tutorial: How to make an Image Upload and Thumbnailer Script PHP”
By paparanch
on Jun 16, 2008
i don’t whats the problem with this because when i uploaded a gif file…its not animating anymore…why?
By pouria
on Aug 7, 2008
hi
i recive this error with every kind of images :
File is not an image! Don’t waste my time!
so whats the problem?
By sohn
on Oct 8, 2008
That’s cool. I test it and it really Great!!