Try to not use goto, as much as you can.
By using goto you will be lost in your own code, because you have to search each time where your goto is pointing.
Here you can do what you want by writing :
if (mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `hash`='$hash' LIMIT 1"))!=0) {
$hash=generateHash(32);
}
2
solved syntax error, unexpected ‘:’