What\'s wrong with my code? I keep getting this error: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in functions.php on line 4
error readin
The gameTableCheck() function has no clue what the $db variable is. Since PHP has no dynamic scoping you have to either declare the variable as global inside the function (if it is a global variable), or pass it as a parameter in the function call.