<?php 
@session_start();
$conn = mysql_connect('localhost', 'akhilagya', 'abhinay@2018AB') or die ("connection not found");
	mysql_select_db('laabh') or die ("connection not found");


	$supplier_name = $_REQUEST['supplier_name'];
	$contact_no = $_REQUEST['contact_no'];
	$supplier_address = $_REQUEST['supplier_address'];
	$contact_person= $_REQUEST['contact_person'];
	$gst_no =$_REQUEST['gst_no'];
	$email = $_REQUEST['email'];
	
	 $sql = "INSERT INTO `tbl_supplier` (`supplier_name`, `address`, `contact_no`, `contact_person`, `email_id`, `gstin`, `session_login_id`) VALUES ('$supplier_name', '$supplier_address', '$contact_no', '$contact_person', '$email', '$gst_no', '".$_SESSION['login_id']."');";
						$query = mysql_query($sql);
						$result = mysql_insert_id();
						 $array[] = '1';
						 $array[] = $result;
						  $array[] = '<option value='.$result.'>'.$supplier_name.'</option>';
	
	
		 echo json_encode($array);
?>

                  
               
 