As Sergey mentions, you can't do it 'directly' from php. But you can output the appropriate javascript that will do so.
I don't construct pages in php using string concatenation, preferring the DOM methods myself. But in any case, you can achieve the task with the following:
<td>
<button onclick="get_accept('<?php echo $data['id'];?>'); this.disabled='disabled';">Accept</button>
</td>
You can see it in action with the simplest of pages:
<html>
<head>
</head>
<body>
<button onclick="this.disabled='disabled';">Disable Me</button>
</body>
</html>
Here's a page that demonstrates it further:
<?php
$myButtonText = "click me if you can!";
?>
<!DOCTYPE html>
<html>
<head>
<script>
function get_accept(input)
{
alert(input);
}
function changeText(el)
{
el.innerHTML = '<?php echo $myButtonText;?>';
}
</script>
</head>
<body>
<button onclick="changeText(this); get_accept('<?php echo $myButtonText;?>'); this.disabled='disabled';">Disable Me</button>
</body>
</html>