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

  $item_name=$_REQUEST["item_name"];
  $hsn_code=$_REQUEST["hsn_code"];

  $sql="INSERT into tbl_item(item_name, hsn_code, session_login_id) values('$item_name', '$hsn_code', '".$_SESSION['login_id']."');";
  $res=mysql_query($sql);
  $result = mysql_insert_id();
   $array[] = '1';
	 $array[] = $result;
	  $array[] = '<option value='.$result.'>'.$item_name.'</option>';
	
	
		
		 echo json_encode($array);


?> 