Israel

Israel

  • NA
  • 1.3k
  • 204.4k

Disable button just after filter

Jan 9 2023 6:20 PM

Hi, I am doing filter and would like just after that its should disable the button. But when I click on the button it's disabled before to do the filter. Thanx to help

<script>
function getAndSetVal0() {
document. getElementById("show_question"). disabled = true;
}
</script>

<form action="" method="GET">
<table align="center">
<td><input type="text" name="recherche_num" style="display:none" placeholder="actualise" value="1.1" class="hidden" ></td>
<td><td><input type="submit" value="Filtre automatique" name="show_question" id="show_question"  onclick="getAndSetVal0();" class="show_question"/></td-->
</table>
</form>
<?php         
$con = mysqli_connect("localhost:","xxx","xxxx","xxxxx");
if(isset($_GET['recherche_num']))
{
$recherche_fin_expl = $_GET['recherche_num'];
$query = "SELECT * FROM company WHERE question='$recherche_fin_expl' ";
$query_run = mysqli_query($con, $query);
if(mysqli_num_rows($query_run) > 0)
{
foreach($query_run as $row)
{
?>
<div class="form-group mb-3">
                                                    
<?php
}
}
else
{
//echo "No data";
}
?>


Answers (1)