hello everyone,
i am hosting my site online and the following code is working on my localhost server but not working on the hosting server i am registered on.
i’m using this code:
[php]<?php
$con = new mysqli(“localhost”,“username”,“password”,“database”) or die(mysqli_connect_error());
mysqli_set_charset($con,“utf8”);
mysqli_query($con,“SET NAMES ‘utf8’”);
$SQL = mysqli_query($con,“call subinsert(’” . $_POST[‘x’] . “’);”);
mysqli_free_result($SQL);
mysqli_close($con);
?>[/php]
but when ‘x’ is arabic string it is stored in the database as ‘??? ??? ??’
i can insert arabic values using phpmyadmin and mysql workpench without any proplems
the proplem is in my php page
any help would be appreciated.