I very new with database and just trying to follow a Youtube video and even used their code but get this error.I'm not sure if I have the host, dbname, username, or password mixed up.
DataBase name: 1152931`your text`
DataBase username: 1152931
DataBase password: equal with account password
DataBase host: localhost
$host = "localhost";
$dbname = "1152931";
$username = "1152931";
$password = "********";
$conn = mysqli_connect(hostname: $localhost,
username: $username,
password: $password,
database: $dbname);
if (mysqli_connect_errno()) {
die("Connection error: " . mysqli_connect_error());
}
$sql = "INSERT INTO message (name, body, priority, type)
VALUES (?, ?, ?, ?)";
$stmt = mysqli_stmt_init($conn);