Is there a way to check if a user is logged in using JQuery?
<p>I want to be able to display a message if a user is not logged in if they try rating a user by clicking a rating. Is there a way to add it to my JQuery code below or can I pass it to my PHP script?</p>

<p>I'm using PHP</p>

<p>Here is the JQuery code.</p>

<pre><code>$('#rate li a').click(function(){
    $.ajax({
        type: "GET",
        url: "http://localhost/update.php",
        data: "rating="+$(this).text()+"&amp;do=rate",
        cache: false,
        async: false,
        success: function(result) {
            // remove #ratelinks element to prevent another rate
            $("#rate").remove();
            // get rating after click
            getRating();
            getRatingAvg();
            getRatingText2();
            getRatingText();
        },
        error: function(result) {
            alert("some error occured, please try again later");
        }
    });
</code></pre>
