jquery post on document ready
<p>All i want is, a data will pass into this php file: check.php and this php file will pass data into that function when the page is ready. this is just an expirement.</p>

<p>ok I have this code:</p>

<pre><code>$(document).ready(function() {
    $.post("check.php", {
        name: "log"
    }, function(data) {
        if (data === "yes") {
            alert('has been login');
        } else {
            alert('has not login');
        }
    });
});​
</code></pre>

<p>and i have this php code ("check.php") where the jquery post will pass the data into.
​</p>

<pre><code>&lt;? //check
$chk = $_POST['name'];

if (isset($chk === "log")) {
    if (isset($_COOKIE['admin'])) {
        if ($_COOKIE['admin'] === "login") {
            echo "yes";
        }
    } else {
        echo "no";
    }
} else {
    echo "no";
}
?&gt;
</code></pre>

<p>but nothing happen, even i change the whole code in check.php into: "echo "yes";" theres nothing happen,  i guess, its either there is no data receive or there is no data pass. Hope someone could help me into this simple and cute problem that im stuck with. thank you in advance</p>
