RE: [PHP] Re: Empty form variables when uploading, Help please???
another option could be to make the choice between delete and update two radio buttons with the same name and just have the one submit button, then add extra logice to your PHP script to either delete or update depending on the value of this field. good luck! Steffan -Original Message- From: The Big Roach [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 4:19 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Empty form variables when uploading, Help please??? 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=TOPPFONT face=Verdana size=1BFoto/B (opcional,brtamaño máximo: 20k,brformatos 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=100 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] _ This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information visit http://www.messagelabs.com/stats.asp DISCLAIMER Any opinions expressed in this email are those of the individual and not necessarily the company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. It may contain material protected by attorney-client privilege. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. If you have received this email in error please notify the Network Manager by telephone on +44 (0) 870 243 2431. Please then delete this email and destroy any copies of it. This email has been swept for viruses before leaving our system. Admiral Insurance Services Limited, Cardiff CF10 3AZ _ This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information visit http://www.messagelabs.com/stats.asp
RE: [PHP] Re: Empty form variables when uploading, Help please???
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=TOPPFONT face=Verdana size=1BFoto/B (opcional,brtamaño máximo: 20k,brformatos 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=100 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]