Login Game System

How can I make a system that uses pass and username.
And the username and password comes with the game CD, so when the person buys the game and opens up the Execution file and it will say this:

Username:________________________

Password:___________________________

And when he inputs the correct Username and pass, the player will have access to the game.

To do this you’d have to either have the user on an active internet connection which checks their inputs to a list of possible username and password combinations on a server, or which compares them to an in-built list. I’m afraid the ins and outs of this are too complicated to answer here in any reasonable timeframe, but I suggest you get reading up on MySQL and the PHP scripting language.

Still, I suspect your aim is to stop people from stealing your game, in which case I suggest you concentrate more on just making a great product, marketing it well, and ensuring that it’s more convenient to just buy a copy than it is to pirate it.