Good morning everyone! I'm using Hostinger as host, and I do not put it to publicize it, but because the technical service is not able to tell me why despite having the code that I will put below the accents and special characters if they are saved in the database BUT THEY DO NOT RECOVER AS SUCH AS Rare symbols
The first thing in phpmyadmin I select the database and in operations I put a collation utf8_general_ci. Same in each of the tables and fields of type char.
Then already on the php webService:
header('Content-Type: text/html; charset=UTF-8');
$link = new mysqli("mysql.hostinger.es","xxxxxxxx","xxxxx","xxxxxx");
if ($link->connect_errno) {
echo "Fallo al conectar a MySQL: (" . $link->connect_errno . ") " . $link->connect_error;
}
mysqli_set_charset($link,"utf8");
mysqli_select_db($link,$u356604334_swa);
$link->query("SET NAMES utf8");
That at the time of connecting. Then in each query I use utf8_decode
with the string I pull out.
echo utf8_decode( implode(":",$arraySalida));
The fact is that at the beginning when entering data in the database, I cut the chain to get an accent, a ñ, ... when I did everything that I have described previously passed from that to put the characters in the database, I from phpmyadmin can see in fields like last name chains Muñoz, Hernández, ... But when I make a select to get those fields, it returns rare symbols ...
Any ideas? Do you recommend any other hosting?
Thank you very much