if (!session('userid')) { $url = "http://".$_SERVER ['HTTP_HOST']."/index/login/"; header("refresh:1;url=$url"); }