Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/01/2012, 04:31
oliverarthurnardi
 
Fecha de Ingreso: noviembre-2010
Ubicación: aun no se donde vivir
Mensajes: 112
Antigüedad: 13 años, 6 meses
Puntos: 3
Problema con subida de imagenes

Hola buenas chicos!!

Alguien de por aqui me puede ayudar con esto que me esta pasando... el problema es que no lo hacer que esto funcione, es decir que no logro que la imagen se suba.

y el error que me da es este:

( ! ) Notice: Undefined index: tpm_name in C:\wamp\www\evatienda\admin\imagenproducto.php on line 13
Call Stack
# Time Memory Function Location
1 0.0007 370120 {main}( ) ..\imagenproducto.php:0

el script es el siguiente:

Código PHP:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Subir Imagen</title>
  6. </head>
  7.  
  8. <body>
  9. <?php
  10. if ((isset($_POST["enviado"])) && ($_POST["enviado"] == "form1")) {
  11.   //Datos del archivo
  12.   $nombre_archivo = $_FILES['userfile']['name'];
  13. move_uploaded_file($_FILES['userfile']['tpm_name'],"../imagenes/productos/".$nombre_archivo);
  14.  
  15.   ?>
  16.   <script type="text/javascript">
  17.     oponer.document.form1.photo.value="<?php echo $nombre_archivo; ?>";
  18.     self.close();
  19.   </script>
  20.   <?php
  21. }
  22. else
  23. {
  24.    
  25. ?>