User login via server

User logins in with mail and password, connecting to a apachie server
service,
PHP script connect to MySql server, and retrun all the user info to the
entered mail and password.
Needed Error massage returned if failed to login.