Re: PHP button
| From: | Marek Kilimajer | Date: | Mon, 26 Apr 2004 14:44:38 +0000 |
| Subject: | Re: PHP button | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184655@lists.php.net to get a copy of this message | ||
Brent Clark wrote:
Hi Its nothing special before this whole disabling the button sarga it was:And as I said disabled inputs are NOT submited. [quote] And remember that browsers don't post disabled inputs. If you have a condition in your action script like if($_POST['read'] == 'Next') ... this will be false even if you click the submit button. [/quote] That means you have to find another way. You can use hidden input: <input type="hidden" name="read" value="Next"> (and remove name="read" from the submit button) If you have more submit buttons and you make different action based on the value, you can use: onclick="this.form.elements['read'].value = this.value; this.disabled=true;" in each of the submit buttons.//this would be true if the "Next" button, with variable "read" wasclicked if ($read){// then do what needs to be done header("Location: next.php");} as I say this all worked Brent