Arabic not supported in mysql and php -
this question has answer here:
- utf-8 way through 14 answers
i have part of code works fine arabic issue.
$result = mysql_query("select login, password, name, role qm_users login = '$login'"); if (!$result) { die('invalid query: ' . mysql_error()); } $row = mysql_fetch_array($result); echo $row["name"];
the name
row contains arabic name.
the output of echo
???? ???? ????
in myphpadmin of xamp server, here structure
if going save utf8 encodings mysql database first set connection encoding utf8.
<?php $connection = new mysqli('localhost', 'my_user', 'my_password', 'my_db'); mysqli_set_charset($connection, "utf8"); ?>
Comments
Post a Comment