![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
22/05/2009, 06:20
|
![Avatar de anlhp](http://static.forosdelweb.com/customavatars/avatar255816_3.gif) | | | Fecha de Ingreso: agosto-2008
Mensajes: 121
Antigüedad: 16 años, 5 meses Puntos: 1 | |
Respuesta: Problema añadir varios adjuntos mira, el siguiente codigo me funciona a mi, pruebalo y dime que tal
html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<script type="text/javascript">
function _add_more() {
var entrada = document.createElement('input');
entrada.setAttribute('type', 'file');
entrada.setAttribute('class', 'noticias');
entrada.setAttribute('className', 'noticias'); // Para IE
entrada.setAttribute('name', 'adjunto[]');
var seccion = document.getElementById("datosAdjuntos");
seccion.appendChild(document.createElement('br'));
seccion.appendChild(entrada);
}
function _send(){
var oform = document.getElementById("datosAdjuntos");
oform.submit();
}
</script>
</head>
<body>
<a href="#" onclick="_add_more()">Añadir</a>
<br />
<a href="#" onclick="_send()">Enviar</a>
<form id="datosAdjuntos" action="script.php" method="post" enctype="multipart/form-data">
</form>
</body>
</html>
php
<?php
print_r($_FILES);
?> |