prepare("select * from payroll where staff_id = '$username'") ; $chk->execute(); if($chk->rowcount() > 0) { $msg = "This Staff Record has been added before try another" ; } if(empty($msg)) { if($user->paylist($username,$pos,$bs,$ha,$ta,$wa,$ma,$oa,$gs)) { $msg = "Record Added Succefully" ; } } } ?>