i'm building a tgp script, i have a problem with the thumbnails, they come out distorted.
here is the code:
PHP Code:
if(!eregi("(.jpeg|.jpg)", $_FILES['imagefile']['name']))
{
echo "please upload only files in jpg format";
die;
}
if($_FILES['imagefile']['type'] != "image/jpeg" && $_FILES['imagefile']['type'] != "image/pjpeg")
{
echo "please upload only files in jpg format";
die;
}
$upload_path='/virtual/danny/images/myimage.jpg';
copy ($_FILES['imagefile']['tmp_name'], $upload_path) or die ("An Error has occured: the thumbnail could not be uploaded to the server");
i'm missing something here. what is it?