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

if(strlen($user)<=0)
{
  print "<script> alert('Invalid User'); document.location='inde.php' </script>";
  return;
}

$sql="SELECT code,acname FROM customer where brcode='$brcode' and cname='$cname'";
$result = mysqli_query($db,$sql);
$row=mysqli_fetch_row($result);

?>
<input type=text name='cusnwnm' width="210px" onKeyUp=chkey(this) onKeyPress="return handleEnter(this, event)">
<input name='reg' id='reg' type='text' style='width:60px;border:1px solid grey; border-style:dotted;' value='<? echo $row['0']; ?>' readonly onchange='showinfo(this.value)' onfocus='sel(this.id)' onKeydown='return handleEnter(this, event)'>



