I need a query to execute when entering a page (php). I've already added this to the top.
Code:-
mysql_query("INSERT INTO `table_name` (`player_id`, `unit1`, `unit2`, `unit3`, `unit4`)
VALUES ('".$_SESSION['user']['id']."', 0, 0, 0, 0)");
When my users enter the page that contains that, the query should be executed. Yes database connection is included.
How do I fix this? (also will it duplicate player_id)?