Ver Mensaje Individual
  #3 (permalink)  
Antiguo 17/08/2010, 09:45
Gashe
 
Fecha de Ingreso: agosto-2010
Ubicación: Madrid
Mensajes: 53
Antigüedad: 13 años, 9 meses
Puntos: 1
Respuesta: (subir_foto_usuario_perfil) $dudas= "muchas"; echo "ayuda"; // Por favor

el input que se usa para subir archivo es: <input type="files" name="avatar">, y especificando en el form el enctype="multipart/form-data";

Y luego lo mandas con un action="subiravatar.php"
Y en el action lo guardas de una manera como esta:

$target_path = "fotos/"; // carpeta donde lo guardas
$target_path = $target_path ."foto_".time()."_t.jpg"; // nombre que le asignas
move_uploaded_file($_FILES['foto']['tmp_name'], $target_path); // coges el archivo temporal
imagejpeg($image,'../fotos/foto_'.time().'_t.jpg',100); // y lo guardas con la extension, calidad ..

Espero q te sirva ;)