Jquery and PHP rating function problem
<p>I know that I was already posted similar question but I just can't find the answer and figure it out how to solve this problem.</p>

<p>I'm trying to customize Jquery Star Rating plugin (<a href="http://php.scripts.psu.edu/rja171/widgets/rating.php" rel="nofollow">link text</a>) but I do not know what to do to show the message based on response  of PHP script.</p>

<p>Jquery script successfully send rating data to PHP scripts that query the database and based on that echo message of proper or improper rating.</p>

<p>What should I add to an existing JS code so I can get echo from PHP and base on that write a message on some DIV beside rating star?</p>

<p>Jquery:</p>

<pre><code>$('#gal').rating('gl.php?gal_no=&lt;?=$gal_no;?&gt;&amp;id=&lt;?=$id;?&gt;', {maxvalue:10,increment:.5, curvalue: &lt;?=$cur;?&gt;});
</code></pre>

<p>Simplified PHP code:</p>

<pre><code>$br=mysql_query("SELECT count(gal) as total FROM ...")
if ... {
echo '0';
}
else echo '1';
}
</code></pre>

<p>Jquery code successfully transmitted data to PHP script and when the PHP done with checking data echo the result ('1' or '0'). How can I get this PHP result back to Jquery and based on them write a message? Something like:</p>

<pre><code>if(data=="1")
{
$("#error").show("fast").html('not correct').css({'background-color':'#F5F5F5','border-color' : '#F69'});
}else{
$("#error").show("fast").html('correct').css({'background-color' : '#FFF','border-color' : '#3b5998'}); 
}
</code></pre>

<p>If someone has an idea...I would appreciate it.</p>
