I'm writing a game in PHP. Now the script generates a random number to get the players registered. But: the number generated is the same for every player. It's about this line:

$activationkey = rand( 1000000000, 9999999999 );

Every player gets the same key. How can this be? Any help? Thanks you

Leon

srand ([ int $seed ] ) : void

Seeds the random number generator with seed or with a random value if no seed is given.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.