list($width, $height, $type, $attr) = getimagesize($_FILES['image']['name']);


$thumb = imagecreatetruecolor(120, 90);
$source = imagecreatefromjpeg($_FILES["image"]["name"]);
imagecopyresampled($thumb, $source, 0, 0, 0, 0, 120, 90, $width, $height);


imagejpeg($thumb, $_SERVER['DOCUMENT_ROOT']."/foto/"."thumb.jpg", 100);

c'e' qualcuno che sa dirmi perche' con questo codice mi crea un thumb nella cartella foto,pero tutto nero senza che si veda l'immagine ridimensionata?

ciao grazie

P.S: $_FILES['image']['name'] e' un immagine passata da un form con input type="file"