error in add score script

am using this tutorial http://wiki.unity3d.com/index.php?title=Server_Side_Highscores

i am getting an error

Notice: Undefined index: name in addscore.php on line 16

Notice: Undefined index: score in addscore.php on line 16

Notice: Undefined variable: hash inaddscore.php on line 17

this is my pdo script

// Configuration
$hostname = ‘localhost’;
$username = ‘idprateek’;
$password = ‘12345’;
$database = ‘high’;

$secretKey = “123546789”; // Change this value to match the value stored in the client javascript below

try {
$dbh = new PDO(‘mysql:host=’. $hostname .‘;dbname=’. $database, $username, $password);
} catch(PDOException $e) {
echo ‘

An error has ocurred.

’, $e->getMessage() ,‘
’;
}

realHash = md5(_GET[‘name’] . $_GET[‘score’] . $secretKey);
if($realHash == $hash) {
$sth = $dbh->prepare(‘INSERT INTO scores VALUES (null, :name, :score)’);
try {
sth->execute(_GET);
} catch(Exception $e) {
echo ‘

An error has ocurred.

’, $e->getMessage() ,‘
’;
}
}

the same one that has a comment at the top that says “confirmed not working, use above” ?
Can’t help beyond that, maybe someone else can.
Maybe try the script above it :slight_smile: