Thread: submit button enable and disable
Results 1 to 2 of 2
enable and disable submit button Forum: PHP ForumReplies: 1
Disable Refresh and Back button?? Forum: HTML ForumReplies: 27
01-17-2009, 07:48 AM #1
submit button enable and disable
<?php if(isset($_POST['push1'])) $disable = true; ?> <form action="" method="post" name="form1"> <input name="ch1" type="radio" value="a" /> <input name="ch1" type="radio" value="b" /> <input name="ch1" type="radio" value="c" /> <input name="push1" type="submit" value="SET" class="style24" <?php if($disable) echo 'disabled="disabled';?>/>
As per the above mentioned code,here once we select a radio button and then click submit button the submit button will be disabled.Now my problem arises after this.Here the submit button must be enabled.Pls anyone help me in this regard.
waiting for reply
Last edited by vinyl-junkie; 01-17-2009 at 10:24 AM. Reason: Added code tags
01-20-2009, 03:52 PM #2
Re: submit button enable and disable
Ok. Let me make sure I understand how you want things to work.
1. User (trainee) is presented with a form.
2. User selects one radio button and submits the form
3. The form is submitted back to itself, and the button is disabled.
4. The value the user selected is written to a text file.
5. Once the value is written to the text file, the button is enabled, and the form can be submitted again.
If that is correct, let me know which steps you are having problems with.