Hi Team,
I have my website live and up and running, but I get connection errors when logging into the SQL database. I have read that this maybe an error on the server provider, the "mysqli php extension" is not enabled. My sever is 1and1 using MySQL5.5.
My development steps to get this PHP example working, were to create a new login page on my website, that logs into a hidden PHP page. When this page is logged into the below PHP code is executed.
If somebody would be kind enough indicate what I am doing wrong.
Below is my code and the error, can you see any obvious problems:
<?php
$servername = "servername";
$username = "username";
$password = "password";
$dbname = "dbname";
$conn = mysqli_connect($servername, $username, $password, $dbname);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
?>
Error:
Fatal error: Call to undefined function mysqli_connect()