Dear Colleagues I have below code the code is giving error
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo “Connected successfully”;
$sql = “SELECT * FROM Employee”;
$result = $conn->query($sql);
$stmt = $conn->prepare(“SELECT * FROM Employee;”);
$stmt->execute();
the page error is :
Connected successfully
Fatal error : Uncaught Error: Call to a member function execute() on boolean in /storage/ssd5/023/10028023/public_html/test.php:36 Stack trace: #0 {main} thrown in /storage/ssd5/023/10028023/public_html/test.php on line 36
all other cod e that worked on my locall machine gave erro to access the database in the site is there is any missing module or configuration for PHP to be able to access MYSQL