want to add action in status checkbox August 23, 2021, 04:45:00 AM I wanted to add action in status checkbox <?phpif($data['Status'] == 1){?><a href="javascript:void()" title="Enable" class="btn btn-sm btn-default" onClick="Disable('<?=$data['id']?>')"><i class="fa fa-check-circle text-success"></i></a><?php } else{?><a href="javascript:void()" title="Disable" class="btn btn-sm btn-default" onClick="Enable('<?=$result['id']?>')"><i class="fa fa-times-circle text-danger"></i></a><?php } ?>function Disable(id){ window.location="action=disable&sid="+id;}function Enable(id){ window.location="action=enable&sid="+id; }public function disable($id){global $conn;$disableSql = mysqli_query($conn,"UPDATE products SET Status=0 WHERE id='".$id."'"); }public function enable($id){global $conn;$disableSql = mysqli_query($conn,"UPDATE products SET Status=1 WHERE id='".$id."'");} Quote Selected