Tutorial: How to make an Image Upload and Thumbnailer Script PHP

Pages: 1 2 3 4 5 6 7

5. The last section to this tutorial. After the html form on the same page thumbs.html i added this:

  1.   <img src="<?php echo 'thumbs/'.$filename; ?>" alt="" />
  2.   Link:
  3. <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.

Pages: 1 2 3 4 5 6 7

  1. 3 Responses to “Tutorial: How to make an Image Upload and Thumbnailer Script PHP”

  2. By paparanch PHILIPPINES Windows Vista Mozilla Firefox 2.0.0.14 on Jun 16, 2008

    i don’t whats the problem with this because when i uploaded a gif file…its not animating anymore…why?

  3. By pouria ISLAMIC REPUBLIC OF IRAN Windows XP Internet Explorer 6.0 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?

  4. By sohn THAILAND Windows XP Mozilla Firefox 3.0.3 on Oct 8, 2008

    That’s cool. I test it and it really Great!!

Post a Comment