Ver Mensaje Individual
  #21 (permalink)  
Antiguo 19/10/2015, 14:23
pilucho
 
Fecha de Ingreso: noviembre-2004
Ubicación: NULL
Mensajes: 653
Antigüedad: 19 años, 5 meses
Puntos: 6
Respuesta: upload imagen campo vacio al DB

en el codigo de los if y else aparecen todo el texto sin haber procesado a que se debe y eso que lo cambie de este modo.

[
Código PHP:
<?
//////////  ORIGINAL ////////////
// Check if file already exists
if (file_exists($target_file)) {
    echo 
"Sorry, file already exists.";
    
$uploadOk 0;
}
////////////////////////////////


// MODIFICADO
// Check if file already exists
if (file_exists($target_file)) {
    echo 
"Sorry, file already exists.";
    
$uploadOk 1;
    } else {
        echo 
"Sorry, file not exists..";
        
$uploadOk 0;
}
// Check file size
if ($_FILES["fileToUpload"]["size"] > 500000) {
    echo 
"Sorry, your file is too large.";
    
$uploadOk 1;
    } else {
        echo 
"Sorry, your file is too small.";
        
$uploadOk 0;
}
?>