the varible $coun is not retuing any value when called enter code here $mysqli_user = 'merchant'; $mysqli_password = ''; $con = mysqli_coect($mysqli_host, $mysqli_user, $mysqli_password); if(!mysqli_select_db($con, $mysqli_db)){ echo mysqli_coect_ero() . PHP_EOL; mysqli_coect_error() . PHP_EOL; die($co_error); }
class check{
public $cnum;
public function update(&$cnumb){
$num = $this -> cnum;
$ref = $_SESSION['ref'];
$query = "SELECT * FROM `stocklists` WHERE `componentnumber` =
'$num' AND `reference` ='$ref' ";
$result= mysqli_query($con, $query);
retu $coun = mysqli_num_rows($result);
}
}
$c = new check();
$a = $c -> cnum = $_POST['cnumb'];
$count = $c -> update($cnum);
?>
