I cannot connect to my database using this very simple mysqli. script:
<?php
$servername = "i put my server name here";
$username = "i put my admin user name here";
$password = "i put my admin password here";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
When I run this, I get the following error message: "<?php
$servername = "alm-0.db.sonic.net";
$username = "alm_0-admin";
$password = "408aba90";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
When I run this script I get the following error: "Fatal error: Cannot instantiate non-existent class: mysqli in /nfs/www/WWW_pages/alm/yiddish/connect.php on line 7".
Line 7 is this: $conn = new mysqli($servername, $username, $password);
Do I need to do something to get mysqli running on my site? Is the problem something else?
Thanks in advance,
Al
<?php
$servername = "i put my server name here";
$username = "i put my admin user name here";
$password = "i put my admin password here";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
When I run this, I get the following error message: "<?php
$servername = "alm-0.db.sonic.net";
$username = "alm_0-admin";
$password = "408aba90";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
When I run this script I get the following error: "Fatal error: Cannot instantiate non-existent class: mysqli in /nfs/www/WWW_pages/alm/yiddish/connect.php on line 7".
Line 7 is this: $conn = new mysqli($servername, $username, $password);
Do I need to do something to get mysqli running on my site? Is the problem something else?
Thanks in advance,
Al