You should use an AJAX request, because there is no redirection nor reloading.
To use the exemple below, you must include jQuery
<!-- data-id is the id you got before -->
<input type="button" data-id="<?php echo $row_RecStudent['stu_id']; ?>" name="button" class="button-on-click" value="Unqueue" />
<script type="text/javascript">
$(function() {
//On click on this kind of button
$(".button-on-click").on('click', function() {
var id = $(this).attr('data-id');
//Send AJAX request on page youraction.php?id=X where X is data-id attribute's value
//the ID used in mysql query
$.ajax({
url: "youraction.php",
method: "GET",
data: {
id: id
}
}).done(function() {
//Once it is done
console.log("OK!");
});
});
});
</script>
On youraction.php
<?php
//Cast $_GET['id'] to integer to prevent SQL injection.
//If there is no id given, stop
if (empty($_GET['id'])) {
exit();
}
$id = (int)$_GET['id'];
mysql_query("UPDATE tbl_studentdetail SET stu_queue = 0 WHERE stu_id = $id");
Be careful, mysql_* functions are deprecated. Instead, use mysqli_* functions or PDO. And you could prefere use prepared statement for security reason.