I cannot find any answered questions on this specific issue, I am using php 7,mysql server and apache web server This is the code i use to connect to my database:
$servername = 'localhost';
$username = 'root';
$password = 'my_password';
$dbname = 'ehotels';
$conn = new mysqli($servername, $username, $password, $dbname);