I am getting ready with a tutorial website, in which th user takes up quiz and the answer will be stored in database. When the admin enters user's name or id, user's mark has to be fetched from database and displayed in a bar graph. The following code is the graph, "25" is the variable and that has to be fetched from db.
<section id="wrapper">
<ul id="chart">
<li title="25" class="orange">
<span class="bar"></span>
<span class="percent"></span>
</li>
</ul>
</section>
and this is the condition which i've used in my php.
if ($name==NULL)
echo"Please enter a name";
else{
$mark = mysql_query("SELECT mark FROM lms.login WHERE name='$name'");
$mark_num_rows = mysql_num_rows($mark);
if($mark_num_rows==0)
echo "Name does not exist!";
else{
$mark=mysql_result($mark,0);
echo"$name's mark is $mark";
}
}
the result for this code is "Franklin's mark is 50". i want this mark to be used in that class. Like this, i hav lot of marks that has to be displayed. Please help! thanks in advance!