Class 'mysqli' not found

Hi im too the point of falling out with my host…

there php.ini wont load the sqli class or functions it just gives me

Class ‘mysqli’ not found
and
PHP Parse error: syntax error, unexpected ‘$conn’ (T_VARIABLE)

they are saying its my syntex! i am useing this to connect…

[php]$servername = “localhost”;
$username = “”;
$password = “”;

// Create connection
$conn = new mysqli($servername, $username, $password);

// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo “Connected successfully”;

$conn->close();[/php]

is it me or are they full of it? im not a pro but i know how to make a database connection
unless there is a new way to connect ive not seen yet?

sorry for the rant, i could do with some input here,

thanks

Fixed,

my php version was set to PHP7 and of course its depreciated now.
sorry if this looks like a spam post, maybe some one else still is yet to find out the same problem ;D

thanks.

Sponsor our Newsletter | Privacy Policy | Terms of Service