Formularios, arrays y uploads de archivos...
| From: | Federico | Date: | Wed, 17 Mar 2004 14:46:49 +0000 |
| Subject: | Formularios, arrays y uploads de archivos... | ||
| Groups: | php.general.es | ||
| Request: | Send a blank email to general-es+get-46739@lists.php.net to get a copy of this message | ||
si saco enctype="multipart/form-data" andan los vectores, pero obviamente no suben los
archivos... ¿que puedo hacer?
el codigo es algo asi...
<?php
if( isset($_POST['Submit']) )
{
$textfield = $_POST['textfield'];
echo $textfield[0];
echo $textfield[1];
echo $textfield[2];
$file = $_POST['file'];
echo $file[0];
echo $file[1];
echo $file[2];
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="" method="post" enctype="multipart/form-data"
name="form1">
<p>
<input type="text" name="textfield[]">
</p>
<p>
<input type="text" name="textfield[]">
</p>
<p>
<input type="text" name="textfield[]">
</p>
<p>
<input name="file[]" type="file">
</p>
<p>
<input name="file[]" type="file">
</p>
<p>
<input name="file[]" type="file">
</p>
<p>
<input type="submit" name="Submit" value="Enviar">
</p>
</form>
</body>
</html>