<?php
include('connection.php');
if(isset($_POST['name']))
{
$name=mysql_real_escape_string($_POST['name']);
$query=mysql_query("select * from customer_master where customer_id='$name'");
$row=mysql_num_rows($query);
$querys=mysql_query("select * from third_customer_master where sub_customer_id='$name'");
$rows=mysql_num_rows($querys);

if($row==0 and $rows==0)
{


echo "<span style='color:green;'>Available</span>";

}
else
{
echo "<span style='color:red;'>Already exist</span>";
}
}
?>