prepare(" SELECT domain FROM vendor_details WHERE domain = ? AND cus_det_stats = 1 LIMIT 1 "); $stmt->bind_param("s", $domain); $stmt->execute(); $res = $stmt->get_result(); if ($res && $res->num_rows === 1) { $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https" : "http"; $baseHost = "example.com"; // change header("Location: {$protocol}://{$domain}.{$baseHost}/login.php"); exit; } else { $error = "Domain not registered or inactive."; } } } ?> KaalQie | Domain