I want to disable a button after the button onclick and then enable the other one .
echo '<input type="text" id="txtbox1" name="tb1" value="'.$value.'" />';
echo '<input type="submit" id="btn1" name = "btnstart" value="START" onClick="this.disabled=true;"/><input type="submit" id="btn2" name = "btnend" value="End" onClick="this.disabled=true;"/>';
In this case, i can only disable the button but the rest of the process skipped. I cannot update the input textbox value.
Also, How can i disable the btn2 the before onclick btn1?
$value= $_POST['tb1'];
echo '<form name="f1" method="POST" action="">';
echo '<input type="text" id="txtbox1" name="tb1" value="'.$value.'" />';
echo '<input type="submit" id="btn1" name = "btnstart" value="START" onClick="this.disabled=true;"/><input type="submit" id="btn2" name = "btnend" value="End" onClick="this.disabled=true;"/>';
echo '</form>';
echo '</td>';
if ( isset( $_POST['tb1'] ) ) {
$new = $value *12;
}
btn1it should be disabled andbtn2should be enabled?