$right) { $groupName = $row["GroupName"]; $right = $row["RightID"]; } } //Can't come in without right if ($right < 0) { $url = 'http://' . $_SERVER['HTTP_HOST'] . '/Front-Page/home.php'; header('Location: ' . $url); exit; }