<?php 
include("config.php");
$ven = "SELECT * FROM `vendor_master` WHERE `status` ='0'";
$ven_res = mysqli_query($conn,$ven);
?>
<!DOCTYPE html>
<html>
<head>
	<title>COMPARE</title>
</head>
<body>
<table>
	<?php 
	while ($ven_row = mysqli_fetch_assoc($ven_res)) { 
	$act = "SELECT * FROM `act_master` WHERE `party_code` = '".$ven_row['code']."'";
	$act_res = mysqli_query($conn,$act);
	$act_row = mysqli_fetch_assoc($act_res);
	if($ven_row['code'] == $act_row['party_code'] && $ven_row['name'] == $act_row['ac_name']){
		$type =  'OK';
		$status =  '';
	}else{
		$type =  'BC';
		$status =  'background: red';
		
	}
	?>
	<tr style="<?php echo $status;?>">
		<td><?php echo $ven_row['code']?> - <?php echo $ven_row['name']?> </td>
		<td><?php echo $act_row['party_code']?>- <?php echo $act_row['ac_name']?></td>
		<td><?php echo $type;?></td>
	</tr>
	<?php } ?>
</table>
</body>
</html>