How to connect database to php using sql queries