Jquery post and get data from PHP
<p>Jquery code looks like:</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>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?
Some thing 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>
