Original Post
I am trying to write a program that fetches the contents of a data base and puts it in tables. When I run it in IE, it works fine. When I run it in anything else, it doesn;t show the text that should be in the tables. I looked at the source through Firebird and it shows that it didn't print anything from this: .$row["message"]., in the following code. So it just has the <tr><td></td></tr>. See for yourselves.
Here is the php code :
<?
$db=mysql_pconnect("something","username","pass");
mysql_select_db("dxhut",$db);
$query="SELECT message FROM news";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
$inum=mysql_num_rows($result);
printf("<html><head><title>DX-Hut</title></head>\n");
printf("<style type = 'text/css'>\n");
printf(".menu{position:absolute;left:25px;top:250px;}\n");
printf(".news{position:absolute;left:200px;top:250px;}\n");
printf("</style>\n");
printf("<table class=menu border=1 cellspacing=0 cellpadding=0 height=150px width=100px>\n");
printf("<tr><td></td></tr>\n");
printf("</table>\n");
printf("<body>");
printf("<table class = news border=1 cellspacing=0 cellpadding=0 width='400px'>\n");
for($i=0;$i<$inum;$i++)
{
$row=mysql_fetch_array($result);
echo("<tr><td>\n");
echo("<table border=1 cellspacing=0 cellpadding=0>\n");
echo("<tr><td><p>".$row["message"]."</p></td></tr>\n");
echo("</table>\n");
echo("</td></tr>\n");
}
printf("</table>");
printf("</body>");
printf("</html>");
?>
[edited by - tHiSiSbOb on September 2, 2003 10:26:08 PM]
[edited by - tHiSiSbOb on September 2, 2003 10:26:56 PM]