2
I have already searched intensively for a solution to show the result of a mysqli query inside an html one, but I can’t 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 doesn’t need to be shown inside a table from my perspective. In aixo is the code of what I want to show, already tested in full php and shows exactly what I want, the only obstacle at this time is to be able to incorporate this same result in 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>
}
?>
Yes the query itself is correct, the problem is to even incorporate the result of the query into the html page... I tested this line of code as you wrote and starting with '<? php' without forgetting to close '}' but still not showing.
– volkel