There is a bd - registration, with a table - information. The table has data about some people. For example - last name, first name, year of birth, etc. I brought all this to the site, but the fact is that when I try to connect styles to it, in particular hover, it does not process them, it only works on the last section of the output data.
] 2
Code:
<div class = 'content' > <?php $link = mysqli_connect("localhost", "root", "", "registration"); /* проверяем соединение */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $link ->set_charset("utf8"); $sql = "SELECT * FROM `information`"; $result = mysqli_query($link,$sql); while($user = mysqli_fetch_assoc($result)) { echo "<div class = 'user'> <a class = 'user_name'>" .$user['name']."</a></br>" ."<a class = 'user_data'>Возраст: ".$user['data']."</a></br>" ."<a class = 'user_vk'>Мой Вк: ".$user ['vk']."</a></br>" ."</div>"; } /* возвращаем имя текущей базы данных */ #if ($result = mysqli_query($link, "SELECT DATABASE()")) { #} /* изменяем текущую базу данных на world */ #mysqli_select_db($link, "world"); /* возвращаем имя текущей базы данных */ #if ($result = mysqli_query($link, "SELECT DATABASE()")) { # $row = mysqli_fetch_row($result); # printf("Default database is %s.\n", $row[0]); # mysqli_free_result($result); #} mysqli_close($link); ?> </div> Ps I apologize for submitting the code.