Login-Database

Hello,
I am trying to make a simple login to the game. So please how can I make a communication between server and a client. I thought about a PHP server because of security reasons. So basically I type username and password and it sends the info to the PHP server and checks if it’s in database and then it sends back some info like True/False or something. Also I would like to ask which database would be the best. I thought about MySQL. Thanks.