View Single Post
Old 03-08-2005, 10:02 AM  
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
php image upload problem

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?
__________________
* Mainstream ? $65 per sale
* new male contraception
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote