0
I am trying to register data in the database by php, but it does not register in utf8, but when I register directly in the database it registers in uf8.
<?php
include("conecta.php");
function insereUsuario($conexao, $nome, $email) {
$query = "insert into usuarios (nome, email) values ('{$nome}', '{$email}')";
return mysqli_query($conexao, $query);
}
Post your code! So it gets hard to identify the error.
– Jonathan de Toni
<?php include("connects.php"); Function inserts Your($connection, $name, $email) { $query = "Insert into users (name, email) values ('{$name}', '{$email}')"; Return mysqli_query($connection, $query); }
– William Gravina
Your problem is similar to this? --> Handling UTF8 with PHP and Mysql Explain the problem better, if possible, adapt your question with examples! >>How to create a Minimal, Complete, and Verifiable example
– b3g1nn3er
try to use
mysqli_set_charset($conexao, "utf8")
. Documentation: http://php.net/manual/en/mysqli.set-charset.php– Fábio Jânio
Thanks friend! It worked out here thank you very much.
– William Gravina