<?
 session_start();
 include("test.php");
 include("opendb.php");
 //include("includes/function.php");


 $qry= mysqli_query($db,"select * from spareprmast where  partcode='$val'  and brcode='$brcode'");

  //print "select * from spareprmast where  partcode='$val'  and brcode='$brcode'"

if(mysqli_num_rows($qry)<=0)
  
  {
  ?>
  <input type='hidden' name='prtvald' value='invalid' id='prtvald'/>
  <?
   }
   else
   {
   ?>
      <input type='hidden' name='prtvald' id='prtvald' value='valid'/>
   <?
    }
  
   
?>

