Submit Score problem [F8]

Hey guys,

Im bascialy having a problem in submiting the users score and name to the database table. When the user reaches the final score screen they are shown two dynamic text boxes that display there total result and a input text box where the user can entre their name.

This honestly doing my head in. I have done evrything and it still don’t work. I know I can receive the data but I dont get why it dosn’t submit it to my table.

The input text box has a instance name of “playername”
Score total dynamic text box 1 “correct_total”
Score total dynamic text box 2 “wrong_total”

I have also attched an image of my database table if that helps.
http://img91.imageshack.us/my.php?image=databasedg2.jpg

Can I give you my scripts and just have a quick check to see if they look ok:

PHP files. insertValues.php

<?php
$host = “localhost”;
$user = “root”;
$pass = “”;
$database = “activitysystem”;
$table = “activitytable”;

$name = $_POST[name];
$correct_total = $_POST[number_of_attempts];
$wrong_total = $_POST[number_of_wrong_attempts];

mysql_connect($host,$user, $pass);
@mysql_select_db($database) or die( “Unable to select database”);

$query = “INSERT INTO $table VALUES (’$name’,’$number_of_attempts’,’$number_of_wrong_a ttempts’)”;
mysql_query($query);
echo “&ret=Record Updated&”;
mysql_close();

?>

Flash action script:

buttonName.onRelease = function(){
insertVars();
};

function insertVars(){
sv = new LoadVars();
sv.name = playername.text;
sv.number_of_attempts = correct_total.text;
sv.number_of_wrong_attempts = wrong_total.text;
sv.sendAndLoad(‘insertValues.php’, sv, ‘POST’);
sv.onLoad = function(){
if(sv.ret == “Record Updated”){
// run a function to reload the database values into Flash
}
};
};

submitscore.onRelease = function(){
_root.gotoAndStop(1);
}