Message Board |
";
function page_layout($id) {
$conn = pg_connect ("dbname=rockmessageboard");
$result1 = pg_Exec ($conn, "Select subject,id,repid,name,date from mboard where id = '$id' order by repid ASC");
$rows1 = pg_numrows($result1);
if ($rows1 > '0'){
for ($j = 0;$j < $rows1;$j ++){
$name = pg_result($result1,$j,0);
$value = pg_result($result1,$j,1);
$value1 = pg_result($result1,$j,2);
$name1 = pg_result($result1,$j,3);
$date = pg_result($result1,$j,4);
if ($value1 == '0'){
echo "$name ($name1 $date) "; } else { echo " -$name ($name1 $date) "; } } } } $result = pg_Exec ($conn, "Select * from mboard"); $rows = pg_numrows($result); for ($i = 1;$i < ($rows + 20);$i ++){ $doit = page_layout($i); } echo " |