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
http_post_vars).
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
003601c16abd$3985ae70$c46223c8@srascheli">news:003601c16abd$3985ae70$c46223c8@srascheli...
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>







-- 
PHP General Mailing List (http://www.php.net/)
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