Gracias!!!! me ayudaste mucho, al final el código quedo así:
Código PHP:
public function validar()
{
$sql = "SELECT CONTRASENA FROM tbl_empleados WHERE CARNET = '".$this->CARNET."'";
$result = $this->consulta($sql);
if(is_array($result))
{
$d = $result[0];
if( strcmp($this->CONTRASENA,$d["CONTRASENA"]) == 0 )
{
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}