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

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

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

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