I tried this in the link page (CompanyEdit.php)and got preNULL/pre. Not what I was expecting to see.
Here is the code.
<?php
$db = pg_connect("dbname=xxxxxx user=xxxxx");
$query = "SELECT * FROM cr_xxxxxxx";
$result = pg_exec($db, $query);
if (!$result) {printf ("ERROR"); exit;}
$numrows = pg_numrows($result);
if (!$numrows) { printf ("No Data"); exit; }
$row=0;
printf ("<table border='0' >\n");
printf ("<tr>
<td><b>Xxxxxxxx ID</b></td>
<td><b>Description</b></td>
<td><b>Remove</b></td>
</tr>\n");
$chkbox="[]";
do
{
$myrow = pg_fetch_row ($result,$row);
printf ("<tr>
<td><a href='$host/CompanyEdit.php'>%s</a></td>
<td>%s</td>
<td align='center'><input type = 'checkbox' name='$chkbox$row+1'></td>
</tr>\n", $myrow[0], $myrow[1]);
$row++;
}
while ($row < $numrows);
printf ("</table>\n");
?>
Thanks Bill