query($checkuser); if (!$result) { echo $conn->error; } $num = $result ->num_rows; if ($num > 0) { $_SESSION['40109499_elmtree'] = $user; header('Location: admin/dashboard.php'); } else { header('Location: login.php'); } ?>