I'm trying to send Hebrew content through to show up on phpmyadmin. English letters go through perfectly, but Hebrew gives me something like this: חן דו××§.
phpmyadmin collation is set on utf8_unicode_ci (Also tried utf8_general_ci). How can I solve it?
This is my code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
header('Content-Type: text/html; charset=utf-8');
$servername = "//";
$username = "//";
$password = "//";
$dbname = "//";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "INSERT INTO nigunim (name, time, day)
VALUES ('בדיקה', 'בדיקה', 'בדיקה')";
if ($conn->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
?>