$continue = $HTTP_POST_VARS[btnContinue]; $cancel = $HTTP_POST_VARS[btnCancel];
followed by
if ($continue) { //Do something - usually go to another page } elseif { ($cancel) { // Do something - usually go to another page } else { //Do something }
Is this inefficient or is there a better way to do this?
+++
For listing records, I create a function, grid_show() and use it like below after creating the header. It gets called for each record in the record set. Suggestions welcomed....
Todd
/* Display the grid */
function grid_show($id, $ct, $date, $place, $est_amt, $card, $ccn, $session_id) {
if ($ct % 2) {
$class = "Even";
} else {
$class = "Odd";
}
echo("<tr>");
// The first column contains a link for the display of the record
// in trans_edit.php.
echo('<td class="' . $class . '"><b><a href="trans_edit.php?session_id=' . $session_id .
'&tmp_id=' . $id .
'">' . Edit . '</a>' .
"</b></td>");
echo(NL);
echo('<td class="' . $class . '"><b>' . $date . "</b></td>");
echo(NL);
echo('<td class="' . $class . '"><b>' . $place . "</b></td>");
echo(NL);
echo('<td class="' . $class . '"><b>' . $est_amt . "</b></td>");
echo(NL);
echo('<td class="' . $class . '"><b>' . $card . "</b></td>");
echo(NL);
echo('<td class="' . $class . '"><b>' . $ccn . "</b></td>");
echo(NL);
echo('<td class="' . $class . '"><b>' . $state . "</b></td>");
echo(NL);
echo("</tr>\n");
}
--
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php