In a form you can't really have 2 submit buttons.
Either a submit submits or it is just a button.
That's because the var name is already submit (check out your
And you have it twice!
Change one of them and make it just a button (HTML4).
Recheck your post-vars.
This should help.

Otherwise you're loosing your post vars somehwere in the fire-wall.
That's bad!

"Sandra Rascheli" <[EMAIL PROTECTED]> wrote in 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>
  <TD VALIGN=TOP><P><FONT face=Verdana size=1><B>Foto</B>
  (opcional,<br>tamaño máximo: 20k,<br>formatos permitidos: JPEG,
  <? 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 ?>">
  <font face="Verdana,Arial,Helvetica,Sans-serif" size="2">
  <INPUT TYPE="SUBMIT" NAME=salvar VALUE="Continuar ->"></TD>


PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to