I have modified the php to the below, however, it only updates the database if I physically plug in the url plus ?&score=1 into the browser bar. Clicking on the button to call up the AJAX doesn't run the function.
<?php
include 'connect.php';
session_start();
?>
<center>
</center><br><br>
<?php
if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
$userstats="SELECT * from km_users where playername='$player'";
$userstats2=mysql_query($userstats) or die("Could not get user stats");
$userstats3=mysql_fetch_array($userstats2);
if (isset($_REQUEST['score'])){
$score=$_REQUEST['score'];
$updatestats="update km_users set skillpts=skillpts+$score where ID='$userstats3[ID]'";
mysql_query($updatestats) or die("Could not update stats");
}else{
echo 'Score not passed in the request.';
}
}
?>
Attached capx: http://dl.dropbox.com/u/44787590/corporal_sanders_1/Corporal_Sanders_1.capx