I have this PHP script that I want to take the information included in the URL, write it to a MySQL DB, then print the data on the screen. I have the url syntax as site.com/script.php?name=jack&score=110,
replacing jack and 10 with the values that I want to put in. Every time I run the code, I get a 500 -Internal Error. Help?

My code:

<?php

try
{
//set vars
$name = $_GET['name'];
$score = $_GET['score'];
$username="username";
$password="mypassword";
$database="scores";


//sql connect
mysql_connect(localhost,$username,$password);
mysql_select_db($database) or die( "Unable to select database");
mysql_query(INSERT INTO scores VALUES ('$_GET[name]','$_GET[score]'))

echo "Name: " . $name;
echo "<br>";
echo "Score: " . $score;
mysql_close();
}



//catch exception
catch(Exception $e)
{
echo 'Catch Error ' .$e->getMessage();
}

?>

(I am conscious that the username and password aren't real; that's for security purposes.)

Any help is much appreciated!!