Hi guys i'm having a problem in my php script and it says
Notice: Undefined index: Name in /storage/h6/881/1096881/public_html/InsertScore.php on line 16
Notice: Undefined index: Score in /storage/h6/881/1096881/public_html/InsertScore.php on line 16
Notice: Undefined variable: hash in /storage/h6/881/1096881/public_html/InsertScore.php on line 17
try {
$dbh = new PDO('mysql:host='. $hostname .';dbname='. $database, $username, $password);
} catch(PDOException $e) {
echo '<h1>An error has ocurred.</h1><pre>', $e->getMessage() ,'</pre>';
}
$realHash = md5($_GET['Name'] . $_GET['Score'] . $secretKey);
if($realHash == $hash) {
$sth = $dbh->prepare('INSERT INTO getdataofplayer VALUES (null, :Name, :Score)');
try {
$sth->execute($_GET);
} catch(Exception $e) {
echo '<h1>An error has ocurred.</h1><pre>', $e->getMessage() ,'</pre>';
}
}