Arabic not supported in mysql and php -


this question has answer here:

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

enter image description here

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

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -