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> <tr><td>Delegate Card No</td><td><input type="text" name="del"></td></tr> <tr><td><input type="submit" name="submit" value="Submit"</td><td><input type="reset" name="reset"></td></tr> display; echo $str; } } ?>