Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/12/2009, 17:30
xonibeach
 
Fecha de Ingreso: diciembre-2009
Mensajes: 1
Antigüedad: 14 años, 4 meses
Puntos: 0
Ayuda con $_FILES

Hola, estoy intentando subir un archivo desde un formulario pero es imposible y creo q lo he intentado todo . Por una parte está el formulario siguiente:

Código PHP:
 <form method='post' action='empleado.php?insertar=true enctype='multipart/form-data'>
    <fieldset class='
otros'>
    <legend>Crear nuevo articulo</legend>
    <table id='
registro'>
      <tr>
        <td class='
dato'>Descripcion:</td> 
        <td><input type='
text' name='descripcion' value='$descripcion' size='20' maxlength='30' /> </td>
        <td class='
dato'>Precio:</td> 
        <td><input type='
text' name='precio' value='$precio' size='20' maxlength='20' /> </td>
      </tr>
      <tr>
        <td class='
dato'>Imagen:</td>
    <!-- MAX_FILE_SIZE determina el valor maximo del fichero -->
    <input type='
hidden' name='MAX_FILE_SIZE' value='30000' />
        <td><input type='
file' name='imagen' value='$imagen'  /></td>
        <td class='
dato'>Listar:   <input type='text' name='listar' value='$listar' size='5' maxlength='20' /> <span>*</span></td>
        <td class='
dato'>Novedad: <input type='text' name='novedad' value='$novedad' size='5' maxlength='20 /> <span>**</span></td>
      </
tr>
 ... 
continua un poco mas... 
Y por otra parte cuando intento recoger la variable imagen desde empleado.php con $_FILES

Código PHP:
$archivo $_FILES['imagen']['name']; 
me da el siguiente error:

Notice: Undefined index: imagen

Alguien podria decirme que está pasando??
GRACIAS