I wanted to keep track of who is playing on my gameserver, at the end of the script a got this
if($info["numplayers"]>0) {
$start=$info["numplayers"]-1;
for($i=$start;$i>=0;$i--) {
mysql_query ( "insert into players ( Name) values
( ' ".$players[$i]["name"]." ')") ;
}
}
But now it adds all players that are playing on my server nomatter if its already in the database.
How do i make it that only the names that are not in the database are added?