Good thing that is erroring now, as this script has
several SQL Injection Vulnerabilities
$query = "SELECT * FROM `listtap` WHERE `id` = '$id'; ";
$query = "INSERT INTO `approvedtap` (`id`, `name`, `taxno`, `noc`,`c`,`date`) VALUES ('$id','$name','$taxno','$noc','$c','$date') ";
$query = "DELETE FROM `listtap` WHERE `listtap`.`id` = '$id';";
NEVER EVER create queries by piecing together the commands and variables; you should always use
Parameters, and this can be done with prepared statements
References:
PHP: Prepared statements and stored procedures - Manual[
^]
PHP Prepared Statements[
^]