Aqui un ejeplo de como le hacia para cuando los subia a carpetas: (dudo que sea un buen scrip tendra sus bastantes glitches pero me funciona :P )
Código PHP:
if(is_uploaded_file($_FILES['imagen']['tmp_name']))
{
mysql_query($query);
move_uploaded_file($_FILES['imagen']['tmp_name'], "galeria/".$last_id.$extension);
$source_file = "galeria/".$last_id.$extension;
list($width, $height)=getimagesize($source_file);
$h=100;
$w=($width*$h)/$height;
$thumb=imagecreatetruecolor($w, $h);
$source=imagecreatefromjpeg($source_file);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $w, $h, $width, $height);
imagejpeg($thumb, "galeria/thumb/thumb_".$last_id.$extension);
imagedestroy($thumb);
imagedestroy($source);
}
Código PHP:
$fch = date ("d/m/y");
$Binario_Nombre_tmp = $_FILES[$campo]['tmp_name'];
$Size_Binario = filesize($Binario_Nombre_tmp);
$ArchivoBinario = fopen($Binario_Nombre_tmp,'r');
$binario_contenido=addslashes(fread($ArchivoBinario,$Size_Binario));
$binario_peso = $_FILES[$campo]['size'];
$binario_tipo = $_FILES[$campo]['type'];
/* Creamos el insert */
$Insert="INSERT INTO imagenes (nombre, tipo, imagen, size, fecha) VALUES ('".$binario_nombre."', '".$binario_tipo."', '".$binario_contenido."', '".$binario_peso."', '".$fch."');";
/*- Probamos el el insert -*/
if(!mysql_query($Insert))
echo'<span class="msgerror">Error, al insertar la imagen.</span>';
else
$id_imagen=mysql_insert_id();
Bueno de ante mano gracias
![de acuerdo](http://static.forosdelweb.com/fdwtheme/images/smilies/dedosarriba.png)