I have already looked intensively for a solution to show the result of a mysqli query within an html, but I can not find anything. I saw that it is possible to present the result through one with the help of fetch_assoc () in php, but what I want does not need to be shown inside a table in my perspective. Here is the code of what I want to show, I have already tested it in full php and it shows exactly what I intend, the only obstacle at this moment is to be able to incorporate that same result into an HTML page. I hope you can help me, regards.
<?php
require_once('connconf.php');
$conn = mysqli_connect($server, $user, $pw, $bdname) or die ('Connection Error');
$sqlquery = "select ID_Vote from Votes where ID_Player = '1'";
if($result = mysqli_query($conn, $sqlquery))
{
$rowcount = mysqli_num_rows($result);
echo $rowcount; //this is the value i want to publish on a HTML <label>
}
?>