Re: Problemas con variables
| From: | aquezada at bsp-inspector dot cl | Date: | Tue, 22 Jan 2002 17:32:56 +0000 |
| Subject: | Re: Problemas con variables | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-18142@lists.php.net to get a copy of this message | ||
Aun me persiste el error :
Warning: Undefined index: foto in recive.php on line 3
Warning: Undefined index: foto_name in recive.php on line 4
Warning: Undefined index: foto_type in recive.php on line 5
PHP Warning: Undefined index: foto in recive.php on line 3 PHP Warning: Undefined index: foto_name in recive.php on line 4 PHP Warning: Undefined index: foto_type in recive.php on line 5
<?php
echo $HTTP_POST_VARS['foto'];
echo $HTTP_POST_FILES['foto_name'];
echo $HTTP_POST_FILES['foto_type'];
?>
At 17:25 22-01-2002 +0100, you wrote:
Saudiños, es que foto no es una matriz ... prueba con: echo $HTTP_POST_FILE['foto']; echo $HTTP_POST_FILE['foto_name']; echo $HTTP_POST_FILE['foto_size']; y ademas ... el enctype="multipart/form-data" debe ir en el tag <form> no en el <input> así que sería: <FORM METHOD="POST" ACTION="recive.php" enctype="multipart/form-data"> <INPUT TYPE="file" NAME="foto" > <INPUT TYPE="submit"> </form> ----- Original Message ----- From: <aquezada@bsp-inspector.cl> To: <lista@phpes.com> Sent: Tuesday, January 22, 2002 4:15 PM Subject: Re: [PHP-ES] Problemas con variables Sorry me di cuenta recien de esto: echo $HTTP_POST_VARS['foto']['name']; en realidad debe ser linea 2 : echo $HTTP_POST_FILE['foto']['name']; linea 3 : echo $HTTP_POST_FILE['foto']['type]; pero asi me sale el siguiente error: Warning: Undefined index: foto in recive.php on line 2 Warning: Undefined index: foto in recive.php on line 3 PHP Warning: Undefined index: foto in recive.php on line 2 PHP Warning: Undefined index: foto in recive.php on line 3 At 12:09 22-01-2002 -0300, you wrote: Amigos: Tengo el siguiente problemas tengo un formulario en el cual tengo este codigo : <FORM METHOD="POST" ACTION="recive.php"> <INPUT TYPE="file" NAME="foto" enctype="multipart/form-data"> <INPUT TYPE="submit"> y en recive esto : <?php echo $HTTP_POST_VARS['foto']['name']; echo $HTTP_POST_VARS['foto']['type']; ?> y lo unico que me imprime en pantalla es esto : CC --------------------------------------------------------------------- Archivo On-line: http://www.phpes.com/ Manual PHP en español: http://www.php.net/manual/es/ Para dar de baja la suscripción, mande un mensaje a: lista-unsubscribe@phpes.com