我正在尝试将一些值添加到我的mysql表中,我可以手动添加土耳其语字符,但是当我在php代码中尝试插入时会切换字符串,当它面对土耳其字符时,
Here is my php code,
$sql = "insert into emlaknet (phone,userInfo,category) values ('" . $k . "','" . $userName . "','" . $data["cat"] ."');";
executeQuery($sql);
function executeQuery($sql){
global $conn;
mysqli_set_charset($conn, 'utf8');
if ($conn->query($sql) === TRUE) {
//echo "Query Executed success " . $sql . " <br>";
} else {
// echo "Query Executed Error: " . $sql . "<br>" . $conn->error;
}
}