My database and tables inside database collation is utf8_general_ci My connection php file is as follows :
$connection = mysqli_connect(DBHOST,DBUSER,DBPW,DBNAME);
if (!$connection) {
die("Database connection failed: " . mysqli_error($connection));
}
// 2. Select a database to use
$db_select = mysqli_select_db($connection, DBNAME);
mysqli_query($connection,"SET NAMES 'utf8'");
mysqli_query($connection,"SET CHARACTER SET utf8");
if (!$db_select) {
die("Database selection failed: " . mysqli_error($connection));
}
I even add a header to my connection.php file as follows :
header('content-type:text/html; charset=utf-8');
Now when i try to insert Arabic characters into database i got this :
ع ج 
i also tried to do this :
mysqli_query($connection,"SET NAMES 'cp1256'");
mysqli_query($connection,"SET CHARACTER SET cp1256");
But i still get the same result stored in my database. Any idea please ??