Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/11/2012, 02:29
underwebinfo
 
Fecha de Ingreso: septiembre-2012
Ubicación: Buenos aires
Mensajes: 110
Antigüedad: 11 años, 7 meses
Puntos: 9
Pregunta Funcion multiple upload php

Hola tengo un inconveniente con una funcion que "realiza" multiples subidas de archivos les paso el script , cualquier aporte es bienvenido y se agradece!.


Código PHP:
Ver original
  1. if(Upload_Ajax($_FILES['images'],'../../Prueba/'.$Campo['Titulo'].'/')){
  2.         $Mysql->Consulta("INSERT INTO Fotos (Foto,Titulo) VALUES ('".$name."','".$Album."')");
  3.     }
  4.    
  5.    
  6.    
  7.     function Upload_Ajax($Files,$Locacion){
  8.    
  9.         foreach($Files['error'] as $key => $error){
  10.        
  11.             if($error == UPLOAD_ERR_OK){
  12.            
  13.                 $name = $Files['name'][$key];
  14.            
  15.                 if(move_uploaded_file($Files['tmp_name'][$key],$Locacion.$name)){
  16.                    
  17.                     return true;
  18.                
  19.                 }
  20.            
  21.             }
  22.        
  23.         }
  24.    
  25.     }


Metira un error de Notice: undefined variable: name in .....