Hi, Guys:
I have installed XAMPP for Windows 5.5.33, 5.6.19 & 7.0.4 for very test of connection to MySQL. However I always hit the error of "Undefined Property":
Undefined property: mysqli::$conect_error in D:\xampp\htdocs\learnphp\Ex_Files_PHP_forWD\Ex_Files_PHP_forWD\Exercise Files\hanselandpetal\mixed\mixed.php
The following is the code for the connection:
<?php
$message = '';
$db = new mysqli('localhost', 'phpwebdes', 'lynda', 'hanselandpetal');
if ($db->conect_error) {
$message = $db->connect_error;
}
else {
$message = 'Connection is OK';
}
?>
<html>
...
<?php if ($message){
echo "<h2>$message";
} ?>
</html>
Has anyone come across the same problem? Anyone can help resolve this issue?
MInda