<?php
include("db_connection.php");
$Mainclass=new DB_Controller();

$vendor_name=$Mainclass->real_escapes($_REQUEST['vendor_name']);

//$Selling_Rate=$Mainclass->real_escapes($_REQUEST['Selling']);
$Date=date('Y-m-d H:i:s');

$Check_Exist=$Mainclass->num_check('gold_vendor_master',"SLN","Vendor_Name='".$vendor_name."'");
if($Check_Exist==0)
{
	$Fields="`Vendor_Name`,`Entry_Date`,`Created_By`,`Creation_IP`,`Active`";
	$Values="'".$vendor_name."','".$Date."','".$_COOKIE['User_Name']."','".$_SERVER['REMOTE_ADDR']."','Yes'";
	$Ins=$Mainclass->Insert_Data('gold_vendor_master',$Fields,$Values);
$msg=0;//=====Exist=====//	
}
else{
	$msg=1;//=====Exist=====//
}
echo $msg;
?>