0

I am getting this error. dont know why. just installed xampp. my code is:

<?php
$servername = "localhost";
$username = "root";
$password = "";

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

// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
Gameatro
  • 143
  • 1
  • 1
  • 8

1 Answers1

-1

I got the answer. I just had to keep the mysql_start.bat file open while using sql.

Gameatro
  • 143
  • 1
  • 1
  • 8