How can I allow other image formats to be uploaded
<p>This is the code that uploads users logo's I was wondering if anyone could help me.
I want to be able to allow users to upload .png and .gif files too.</p>

<p>Sorry if this is a simple fix but I am very new to php. </p>

<pre><code>&lt;?
//edit logo

function resize_image ($image) {
    $imgsize = getimagesize($image);
    //check for gallery type to determine thumbnail size

    $size_x = 150;      
    $ratio = 150 / $imgsize[0];
    $size_y = $imgsize[1] * $ratio;


    $srcimage         = ImageCreateFromjpeg ($image);
    $newimage         = ImageCreateTrueColor($size_x,$size_y);  
    //$newimage        = imagecreate ($size_x, $size_y);
    imagecopyresized ($newimage, $srcimage, 0, 0, 0, 0, $size_x, $size_y,
    imagesx($srcimage), imagesy($srcimage));
    return $newimage;
}

$myrepairer = new repairer;


//resize and upload image

$file =  $_FILES['logo']['tmp_name'];
$file_name =  $_FILES['logo']['name'];

//upload the image followed by a db update.
if ($file != 'none') {
if (copy($file,'logos/'.$_REQUEST['id'].'.jpg')) {
    unlink($file);
}
$myrepairer-&gt;updatelogo($_REQUEST['id'],$_REQUEST['id']);   
$thumbnail = resize_image('logos/'.$_REQUEST['id'].'.jpg');
unlink('logos/'.$_REQUEST['id'].'.jpg');
ImageJPEG($thumbnail,'logos/'.$_REQUEST['id'].'.jpg');
}

$resultmessage = '&lt;div align="center" class="GreenText"&gt;Logo Updated&lt;/div&gt;';
</code></pre>
