Hello DaniWeb. I want to generate dynamic table for my cources table. I have tried this code but the header(semester) seems not to be working.
<section class="entry-content">
<?php
$counter=1;
$slect="Select * from mcs";
$qry= mysql_query($slect);
while($row=mysql_fetch_row($qry))
{
if($counter==$row[1])
{
print "<div class='heading vcMsg'>
<h3>SEMESTER $row[1] </h3>
</div>
<div class='column message-column'>
<p>
<table class='course-profile'>
<tbody>
<tr>
<th>title</th>
<th>cource</th>
<th>Credits</th>
<th>Marks</th>
</tr>
";
$counter++;
}
print " <tr>
<td>$row[2]</td>
<td>$row[3]</td>
<td>$row[4]</td>
<td>$row[5]</td>
</tr>";
}
print " </tbody> </table>
</p>
<div class='clear'></div>
</div>";
?>
above is the output of this code.. Help...!