You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Key='ffb9562dc34502b839c367c8a52f9a4adad0b7c4' WHERE UserName=admin' at line 1
Code (PHP)
$update="UPDATE useracount SET Key='$key' WHERE UserName=$uname";
$upquery=mysql_query($update) or die(mysql_error());