Access Cookie created in JS on PHP
<p>I created a cookie via JavaScript, will I be able to access it in PHP too? </p>

<p><strong>JS to create a cookie</strong> </p>

<pre><code>function pb_create_cookie(name, value, days2expire, path) {
    var date = new Date();
    date.setTime(date.getTime() + (days2expire * 24 * 60 * 60 * 1000));
    var expires = date.toUTCString();
    document.cookie = name + '=' + value + ';' +
                   'expires=' + expires + ';' +
                   'path=' + path + ';';
}

pb_create_cookie('tour_in_progress', '1', 30, "/");
pb_create_cookie('tour_id', 105, 30, "/");
pb_create_cookie('tour_step', 0, 30, "/");
</code></pre>

<p><strong>Cookie usage in PHP</strong></p>

<pre><code>$tour_id       = $_COOKIE['tour_id'];
$tour_progress = $_COOKIE['tour_in_progress'];
$tour_step     = $_COOKIE['tour_step'];
</code></pre>

<p>Referrence: <a href="http://www.pontikis.net/blog/create-cookies-php-javascript" rel="nofollow">http://www.pontikis.net/blog/create-cookies-php-javascript</a></p>