echo "<tr><td>" . $r['Ename'] . "</td><td>" . $r['TCount'] . "</td></tr>"; } } if ($view == "c") { $cat = new Category(); $res = $cat->getCatSummary(); echo "<table border='1'>\n\t\t\t<tr><td>Category Name</td><td>Partcipants</td></tr>\n\t\t"; foreach ($res as $r) { echo "<tr><td>" . $r['Cname'] . "</td><td>" . $r['TCount'] . "</td></tr>"; } } if ($view == 'd') { $del = new Delegate(); if (isset($_POST['submit'])) { echo "<table>"; $res = $del->get($_POST['del']); foreach ($res as $r) { echo "<tr><td>"; echo $r; echo "</td></tr>"; } echo "</table>"; echo "Events Participated in <br />"; $res = $del->part($_POST['del']); foreach ($res as $r) { echo $r['EName']; } } else { $str = <<<display <form method="post"> <table>