Re: Problemas con variables
| From: | Gordon Gekko | Date: | Tue, 22 Jan 2002 16:25:45 +0000 |
| Subject: | Re: Problemas con variables | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-18133@lists.php.net to get a copy of this message | ||
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