Good day. my problem is if i query from a table. i want to see the result of how many row has been retrieve. but it was displaying all the total rows in may table. i want the exactly number of the result.
<div id="lala">
<?php $query = "SELECT COUNT(*) AS total FROM tblreg where status='reg'";
$result = mysql_query($query);
$values = mysql_fetch_assoc($result);
$num_rows = $values['total']; ?>
<h1>(<?php echo $num_rows ?>)  Registered Member</h1>
</div>
<div id="formdesign"><input type="text" name="filter" value="" id="filter" placeholder="Search " autocomplete="off" /> </div>
<table id="resultTable" data-responsive="table">
<thead>
<tr>
<th>Username</th>
<th>Fullname</th>
<th>Course</th>
<th>Year Graduated</th>
<th>Email</th>
<th>Send Email</th>
<th>Delete</th>
</tr>
</thead>
<?php
include("dbcon.php");
$result=mysql_query("SELECT * FROM tblreg where status = 'reg'");
while($test = mysql_fetch_array($result))
{
$id = $test['reg_id'];
echo "<tr align='center'>";
echo"<td>" .$test['username']."</td>";
echo"<td>" .$test['fullname']."</td>";
echo"<td>" .$test['course']."</td>";
echo"<td>" .$test['year_grad']."</td>";
echo"<td>" .$test['email']."</td>";
echo"<td> <a href='email.php?id=$id' rel='facebox[.bolder]' ><img src='icons/e_mail.png'></a>";
echo"<td> <a href='deleteregmember.php?id=$id' onclick='return confirm_delete()'><img src='icons/list-error.png'></a>";
echo "</tr>";
}
mysql_close();
?>
</tr>