Q:

Check if Cookie is set then load the page else redirect page

I do have a splash page for my website which should ask users for confirmation before entering the site. 
I implemented a "Remember me" checkbox there, so if users check that it will set a cookie so in the next visit page will be redirected automatically. 
The issue i've just ran into it is i want to set a conditional in my header page, so it should check if user is already have the Cookie it should show the page content and if not it should redirect to the splash page. 
Is there any way either with PHP or JS
Here is the Splash page code
   <! doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<!--  JQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
$(document).ready(function(e) {
    $('#remember').click(function() {
        if (this.checked) {
            addCookie(30);
        } else {
            deleteAllCookies();
        }
    });
});

function deleteAllCookies() {
    var cookies = document.cookie.split(";");
    for (var i = 0; i < cookies.length; i++) {
        var cookie = cookies[i];
        var eqPos = cookie.indexOf("=");
        var name = eqPos > -1 ?  cookie.substr(0, eqPos) : cookie;
        document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
    }
}

function addCookie(exdays) {
    var d = new Date();
    d.setTime(d.getTime() + (exdays*24*60*60*1000));
    var expires = "expires=" + d.toGMTString();
    document.cookie = expires;
}

function checkCookie() {
    if (document.cookie == false) {
    } else if (document.cookie.indexOf("expires") >= 0) {
        window.location.href = "https://www.google.com";
    }
}

function goTo() {
        window.location.href = "https://www.google.com";
}
</script>
</head>
<body onLoad="checkCookie();">
<h1>Splash Page</h1>
<form>
<input type="checkbox" id="remember"> Remember me
<br>
<input type="button" value="Enter" onClick="goTo();">
</form>
</body>
</html>

@totallytotallyamazing

A:

I used JS, Jquery, and (PHP just for testing), for this solution. 
Here is the DEMO. ( I slightly altered the previous Splash page Demo to accommodate this Demo.) 
Here is the code:
<! doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<!--  JQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
function checkCookie() {
    if (document.cookie == false) {
        $('#x').text("No Cookie."); 
        window.location.href = "http://www.totallytotallyamazing.com/jsFiddle/cookie/indexNoAlert.html";
    } else if (document.cookie.indexOf("expires") >= 0) {
        $('#x').text("You have Cookie."); 
    }
}
</script>
</head>
<body onLoad="checkCookie();">
<h1>My Website</h1>
<p><div id='x'></div></p>
<? php
session_start();
if(isset($_COOKIE['expires'])) {
  echo "Here is your expiration date " .  $_COOKIE['expires'] . "! <br>";
}
? >
</body>
</html>

After the page does it's final redirect, reload the page one more time to see the "expires" cookie display is expiration date. 
I hope this works for you, please let me know.