Encoding error when entering data into database

Asked

Viewed 62 times

0

Guys, I’m starting now and I’m trying to create a small form with PHP and Mysql that sends the form information to the database, but I’m having a small problem. When entering the data in the database, when I see in the table the data are with coding problem, for example, when I register a user with name "John..." in the table of the database it appears as "John..."The collate of the bank is already as utf8_general_ci and the table as well. How to solve this?

Below is the code and error photo Codigo da conexão

Usuário cadastrado no banco

  • 2

    Try to add mysql_set_charset("UTF8", $conexao); in your code

  • It worked, Grateful! :)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.