Relative Content

Tag Archive for phpsqlmysqlphpmyadminxampp

Trying to access array offset on value of type null in C:xampphtdocs1_V4initmodelclass_model.php on line 36

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(