JQuery and PHP rate me script?
<p>I found this rating script on [http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery#Rate_me:_Using_Ajax] and I cant seem to get it to work like in the example on <a href="http://jquery.bassistance.de/example-rateme.html" rel="nofollow">http://jquery.bassistance.de/example-rateme.html</a>  when I click the rating nothing happens. </p>

<p>How can I fix this problem?</p>

<p><br /></p>

<p>Here is the complete script below.</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /&gt;
&lt;title&gt;jQuery Starterkit&lt;/title&gt;

&lt;link rel="stylesheet" type="text/css" media="screen" href="css/screen.css" /&gt;
&lt;script src="jquery.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(document).ready(function() {
    // generate markup
    var ratingMarkup = ["Please rate: "];
    for(var i=1; i &lt;= 5; i++) {
        ratingMarkup[ratingMarkup.length] = "&lt;a href='#'&gt;" + i + "&lt;/a&gt; ";
    }
    var container = $("#rating");
    // add markup to container
    container.html(ratingMarkup.join(''));

    // add click handlers
    container.find("a").click(function(e) {
        e.preventDefault();
        // send requests
        $.post("starterkit/rate.php", {rating: $(this).html()}, function(xml) {
            // format result
            var result = [
                "Thanks for rating, current average: ",
                $("average", xml).text(),
                ", number of votes: ",
                $("count", xml).text()
            ];
            // output result
            $("#rating").html(result.join(''));
        } );
    });
});
&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;jQuery Getting Started Example - rate me&lt;/h1&gt;

&lt;?php

define('STORE', 'ratings.dat');

function put_contents($file,$content) {
    $f = fopen($file,"w");
    fwrite($f,$content);
    fclose($f);
}

if(isset($_REQUEST["rating"])) {
    $rating = $_REQUEST["rating"];
    $storedRatings = unserialize(file_get_contents(STORE));
    $storedRatings[] = $rating;
    put_contents(STORE, serialize($storedRatings));
    $average = round(array_sum($storedRatings) / count($storedRatings), 2);
    $count = count($storedRatings);
    $xml = "&lt;ratings&gt;&lt;average&gt;$average&lt;/average&gt;&lt;count&gt;$count&lt;/count&gt;&lt;/ratings&gt;";
    header('Content-type: text/xml'); 
    echo $xml;
}

?&gt;

&lt;p&gt;This example demonstrate basic use of AJAX. Click one of the links below to rate. The
number of rating and the average rating will be returned from the serverside script and displayed.&lt;/p&gt;

&lt;div id="rating"&gt;Container&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
