<?php
if(isset($_REQUEST['input'])){
	$input = $_REQUEST['input'];
	include_once("connect.php");
	$query = "SELECT 'C' as `Type` FROM CUSTOMER WHERE AccountNumber = '" . mysqli_real_escape_string($con, $input) . "' UNION SELECT 'SM' as `Type` FROM SALESMAN WHERE `Username` LIKE '" . mysqli_real_escape_string($con, $input) . "'";
	$result = mysqli_query($con, $query);
	if(mysqli_num_rows($result)){
		$row = mysqli_fetch_array($result);
		echo $row['Type'];
	}
}





?>