Interesting because I have used multiple submit buttons on forms for years. Each can have a different name, and even if I use the same name for all of them, which I often do, each can have a separate value. Each will cause all other form fields to transmit their variables in their usual manner, but obviously I will only receive one submit button( the one that was clicked). If all are named "go" with different values (what displays on the button), all I have to do is;
Switch($go) { Case "Add": something; break; Case "Update": something, break; Case "Delete": something else, break; } -----Original Message----- From: The Big Roach [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 8:19 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Empty form variables when uploading, Help please??? << File: [PHP] Re Empty form variables when uploading, Help please.txt >> 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] -- 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]