public function login_admin($username, $password)
{
$stmt = $this->conn->prepare(“SELECT * FROM gym_staff
WHERE username
= ? AND password
= ?”) or die($this->conn->error);
$stmt->bind_param(“ss”, $username, $password);
if ($stmt->execute()) {
$result = $stmt->get_result();
$valid = $result->num_rows;
$fetch = $result->fetch_array();
echo htmlentities($fetch[‘id_gym_staff’]);
return array(
<code> 'id_gym_staff' => htmlentities($fetch['id_gym_staff']),//36
'count' => $valid
);
}
}
</code>
<code> 'id_gym_staff' => htmlentities($fetch['id_gym_staff']),//36
'count' => $valid
);
}
}
</code>
'id_gym_staff' => htmlentities($fetch['id_gym_staff']),//36
'count' => $valid
);
}
}
i cant login in my page login.php
New contributor
Ahmed EL Mir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.