Good afternoon, the first time I encountered such a problem! On a local Denver I try to learn how to write in php, everything would be fine, only the encoding in some mysterious way after a couple of passes through the cycles began to change into diamonds! The page is designed as it should be, all the meta, all the markup, utf-8 is written everywhere, the files are also saved in this format, and the base also writes to utf-8. And I tried it on another PC, the same thing ...
<?php @session_start(); $host="localhost"; /*Имя сервера*/ $user="root"; /*Имя пользователя*/ $password=""; /*Пароль пользователя*/ $db="wash"; /*Имя базы данных*/ mysql_connect($host, $user, $password) or die("MySQL сервер недоступен!".mysql_error()); /*Подключение к серверу*/ mysql_select_db($db) or die("Нет соединения с БД".mysql_error()); /*Подключение к базе данных на сервере*/ mysql_query("SET NAMES utf8"); setlocale (LC_ALL, "ru_RU.UTF-8"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html/php"; charset="utf8"> <meta http-equiv="Cache-Control" content="no-cache"> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script type="text/javascript" src="js/select.js"></script> <script type="text/javascript" src="js/search.js"></script> <script type="text/javascript" src="js/main.js"></script> <link rel="stylesheet" type="text/css" href="css/search.css"> <link rel="stylesheet" type="text/css" href="css/main.css"> <link rel="stylesheet" type="text/css" href="css/tabl.css">
mysql_functions. This extension is deprecated from version 5.5, and in PHP 7 it is no longer. - Visman