Ver Mensaje Individual
  #4 (permalink)  
Antiguo 13/08/2009, 14:41
Avatar de Ing_FOFO
Ing_FOFO
 
Fecha de Ingreso: agosto-2008
Ubicación: Guatemala
Mensajes: 104
Antigüedad: 15 años, 9 meses
Puntos: 8
Respuesta: Si campo vacio no enviar nada

tendrias que validar que le nombre de donde seleccionas el archivo venga vacio:


Supongamos que este es tu form

Código PHP:

<form enctype="multipart/form-data" action="archivo.php" method="POST">
<
input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Escoja un PDF: <input name="subir_PDF" type="file" /><br />
<
input type="submit" value="Subir PDF" />

<
input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Escoja un JPG: <input name="subir_JPG" type="file" /><br />
<
input type="submit" value="Subir Foto" />
</
form

en el archivo.php

Código PHP:

if($_POST['subir_PDF']!='' && $_POST['subir_JPG']!='' )
   {

   
///Insertar
   

Saluditos
__________________
Si te ayude.... regalame un poquito de karma!!!

Los intelectuales resuelven los problemas; los genios ,los evitan.
Albert Einstein (1879-1955)