i am trying to create a progress bar that will show how far towards a target a user is, which is done by the amount of points they have collected. I have come up with this basic PHP to try and get this to work, however when loading the page, nothing appears, is this due to the lack of styling on the bars? Or there something else within this? Essentially i would like a progress bar to say 25/30 for example and have the bar showing how far along they are? I have tried to get the values to come from the database with the $row function. (I am extremely new to php, so sorry for what probably seems like an easy question)
EDIT: I have now got the bar to appear, but there is nothing inside, it seems as the values are not being placed into the bar, does this require me to create something to change them into a %?
<!DOCTYPE html>
<html lang="en">
<head></head>
<body>
<?php
$uname ="";
$password ="";
$host = "";
$db = $uname;
$connection = mysqli_connect($host,$uname,$password,$db);
if (mysqli_connect_error()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
} else {
$query=mysqli_query($connection,"SELECT * FROM targets WHERE user_id='23'");
$numrows=mysqli_num_rows($query);
if($numrows!=0)
{
while($row=mysqli_fetch_assoc($query))
{
echo "<progress value=";
echo $row['self_points'];
echo "max=";
echo $row['target_points'];
echo "></progress>";
}
}
}
?>
</body>
</html>