Answer the question
In order to leave comments, you need to log in
How to display the number of accounts in the form of a bar from a mysql table?
Tell me how to display the number of registered accounts from the mysql table as a progress-bar?
tried
mysql_connect ("$dbip:$dbport","$dblogin","$dbpass");
mysql_select_db("$db") or die ("Нет соединения с базой $db");
$acc = mysql_query ("select count(*) from rp4_admin");
$acc = mysql_result ($acc,0);
mysql_select_db ("$db");
echo "Зарегистрировано:: $acc<br>";
echo "<div class='progress'>
<div class='progress-bar' role='progressbar' aria-valuenow='60' aria-valuemin='0' aria-valuemax='100' style='width: <?php echo $acc; ?>%;'>
</div>
</div>"
Answer the question
In order to leave comments, you need to log in
What exactly doesn't work? bar not showing? I don't know what your css looks like, but most likely you have a typo and not aria-value... probably it should be area-value...
You already have a php script, why are you doing <?php echo ?> a second time? it will probably work like this:
mysql_connect ("$dbip:$dbport","$dblogin","$dbpass");
mysql_select_db("$db") or die ("Нет соединения с базой $db");
$acc = mysql_query ("select count(*) from rp4_admin");
$acc = mysql_result ($acc,0);
mysql_select_db ("$db");
echo "Зарегистрировано:: $acc<br>";
echo "<div class='progress'>
echo "Зарегистрировано:: $acc<br>";
echo "<div class='progress'><div class='progress-bar' role='progressbar' aria-valuenow='60' aria-valuemin='0' aria-valuemax='100' style='width: ".$acc."%;'></div></div>";
eval is changed to echo and some formatting.https://pastebin.com/i6jqZHcD
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question