Ver Mensaje Individual
  #5 (permalink)  
Antiguo 12/11/2009, 14:03
Avatar de elsolodigno
elsolodigno
 
Fecha de Ingreso: agosto-2009
Mensajes: 225
Antigüedad: 14 años, 8 meses
Puntos: 2
Respuesta: Consulta sobre $name = $_FILES['attachment']...

Hola de nuevo abimaelrc, disculpa la molestia pero no te he entendido muy bien...; te paso todo el form:

<form method="post" action="<?=$_SERVER['PHP_SELF'];?>" enctype="multipart/form-data" name="phmailer" onsubmit="return Checkit(this);">
<table>
..................

<td><b>Adjuntar archivo 1:</b></td>
<td><input name="attachment[]" type="file" size="45" /></td>

<? $name = $_FILES['attachment']['name'][0]; ?>

<input name="nombrearch" type="hidden" size="30" value="<?=stripslashes(htmlspecialchars($name));?> " />

.............

<tr>
<td colspan="2" width="100%" class="table_footer">
<input type="hidden" name="submit" value="true" />
<input type="submit" value="<?=$submitvalue;?>" /> &nbsp;
<input type="reset" value="<?=$resetvalue;?>" />
</td>
</tr>
</table>
</form>

Pero a mi correo me llega el campo en blanco...

Ahora si a lo sgte:

<? $name = $_FILES['attachment']['name'][0];
echo $name;
?>

lo agrego fuera del form me lo imprime re bien, pero necesito que todo se ejecute dentro del form, será posible?. Disculpá nuevamente y gracias por tu tiempo.