Got PTID $ptid
\n"; $result = pg_query ($dbi, "SELECT type as bob FROM placetype WHERE ptid = '$ptid'"); if (pg_num_rows ($result) == 1) { $list = pg_fetch_array ($result); $out = "Place type $ptid is ".$list['bob']."
\n"; } else { $out = "Sorry - no such placetype known
\n"; } return $out; } /* ptdetails () */ if (isset ($_GET['PTID'])) { echo ptdetails ($_GET['PTID']); } else { $result = pg_query ($dbi, "SELECT ptid, type FROM placetype"); echo "| $ptid | $type |