<?php
session_start();
$brcode = $_SESSION['brcode'];
$user = $_SESSION['user'];
if(strlen($brcode)<=0)
{
 	print "<script> alert('Session timed out'); parent.document.location='../index.php'; </script>";
	return;
}
include("../opendb.php");
$reg=$_REQUEST['cname'];



$sql="select orderto from saleorder_sparedc where brcode='$brcode' and orderno='$reg'";

$result = mysqli_query($db,$sql);

$row=mysqli_fetch_array($result);

echo $row['0'];
?>



