Tell me, please, in the database I make a request to add an entry

$new_user = "INSERT INTO `users` (`login`,`mail`,`password`,`reg_about`,`reg_like_game`,`reg_date`,`reg_ip`) VALUES ('$login','$mail','$password','$about','$like_game','$reg_date','$reg_ip')"; $register_user = mysqli_query ($link,$new_user); if($register_user) {echo "<br />Регистрация прошла успешна"; 

The following is added to the database: Р ·С ‚Р · РЅР ° РєРѕРјС‹ С ... (namely, in the field where Russian letters are) how to make the encoding a single UTF-8 ... Please tell me)

  • 2
    google to help [HERE] [1] [1]: hashcode.ru/questions/37043/… - naguwal
  • one
    @Dmitry Astafyev, To format a code, select it with the mouse and click on the {} button of the editor. - etki
  • one
    @ Dmitry Astafyev, both extensions work with the same mysql server and the commands sent (not the functions, but the commands) will be identical. - etki

2 answers 2

it is likely that the tables themselves should be encoded

utf8_general_ci

  • so it is :) - Dimcheg

mysqli_set_charset ($ c, "utf8");