I have this code that when submitted, it generates random number from the array.
<?php
if(isset($_POST['roll'])) {
$randarray = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
$randselect = array_rand($randarray);
$nr = $randarray[$randselect];
echo '<p class="btn btn-info"> Branch: '. $nr. '</p>';
}
?>
<form action="#" method="post">
<button type="submit" class="btn btn-default" name="roll">Roll Branch </button>
</form>
What I wanted to do is after the form was submitted, the button will be disabled. Any thoughts?