Re: Re: Empty form variables when uploading, Help please???

From: Date: Tue, 13 Nov 2001 15:25:34 +0000
Subject: Re: Re: Empty form variables when uploading, Help please???
Groups: php.general 
Request: Send a blank email to php-general+get-74448@lists.php.net to get a copy of this message
The Big Roach wrote: > > 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. That's definetely not true. You can have more than one submit buttons in a form. I often make formulars with more than one submit button, there have not been any problems. You just have give a name and a value to your submit buttons. Then you can check which one was pressed by the user. For example: ... <input type="submit" name="submit1" value="do this"> <input type="submit" name="submit2" value="do that"> ... Then just write: if ($submit1 == "do this") ... else if ($submit2) == "do that") ... To srascheli@telcel.net.ve: Please post some code your formular action script (foto.php). Having just the form, we can guess what went wrong.

« previous php.general (#74448) next »