UPLOADING BLUES: Empty form variables when uploading
| From: | Sandra Rascheli | Date: | Sat, 10 Nov 2001 00:54:59 +0000 |
| Subject: | UPLOADING BLUES: Empty form variables when uploading | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-74070@lists.php.net to get a copy of this message | ||
Hi everybody,
I hope someone is able to help me with this, I've been having this problem for a couple of
months now and I have not been able to find a solution. I have a form to upload a file which submits
to itself, and has two submit buttons, one called "eliminarfoto" (deletephoto) and
"salvar" (savephoto), but for some weird and unexplainable reason (it only happens to some
users, not all of them) when they hit any of these two submit buttons, the form returns empty
variables.
This is part of my script, has anybody had a similar problem before??? Any help would be greatly
appreciated.
<FORM ENCTYPE="multipart/form-data" ACTION="foto.php" METHOD=POST>
<TABLE border=0 cellPadding=2>
<TR>
<TD VALIGN=TOP><P><FONT face=Verdana size=1><B>Foto</B>
(opcional,<br>tamaño máximo: 20k,<br>formatos permitidos: JPEG,
GIF)</FONT></TD>
<TD>
<? if ($foto)
{
echo "<IMG align=bottom border=0 width=140 height=160 src=\"../fotos/$foto?nc="
. time() ."\"><br>";
}
?>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000">
<INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" NAME="eliminarfoto" VALUE="Eliminar">
<INPUT TYPE="hidden" NAME=foto VALUE="<? echo $foto ?>">
</TD>
</TR>
<TR>
<TD VALIGN=TOP COLSPAN=2 ALIGN=CENTER>
<font face="Verdana,Arial,Helvetica,Sans-serif" size="2">
<INPUT TYPE="SUBMIT" NAME=salvar VALUE="Continuar ->"></TD>
</TR>
</TABLE>
</FORM>