<?php

/* $Id: SelectCustomer.php 7133 2015-02-07 03:23:51Z daintree $*/

//include('includes/session.inc');
//$Title = _('HRMS');
//include('includes/header.inc');
//include('includes/SQL_CommonFunctions.inc');
//echo '<link href="' . $RootPath . '/css/evergreen2'.'/default.css" rel="stylesheet" type="text/css" media="screen"/>';

      

//check.php  

$connect = new mysqli("localhost", "sooggoo", "4Compassion*", "evergreenint"); 


//
$suppinvno = $_POST['suppinvno']; // request
$suppno = $_POST['suppno'];
// Get username list


 $query = "SELECT suppreference FROM supptrans WHERE suppreference  = '".$suppinvno."'
 AND supplierno = '".$suppno."'";
 $result = mysqli_query($connect,$query);  
 
$row = mysqli_fetch_array($result);
	 if (mysqli_num_rows($result)){
  $data = $row['suppreference'];
	 
	 echo json_encode($data);
		 
 }else{
		 
		echo "0";
	 }

 // encoding array to json format
 	
exit;


// Get details


?>

