A
Anonymous
Guest
OK I have spent the last hour searching google for some free information on how to show my mySQL data in Tables but no luck, Also tried playing with code but no luck.
Code for getting data
-------------------------------------
<?php
$db = mysql_connect("localhost","sillyfoo_admin","5177ym4n");
mysql_select_db("sillyfoo_database1",$db);
//replace the above values with your actual database values
$res=mysql_query("SELECT * FROM News");
if(mysql_num_rows($res)==0) echo "There is no data in the table";
else
for($i=0;$i<mysql_num_rows($res);$i++) {
$row=mysql_fetch_assoc($res);
echo "ID : $row[Title] Name : $row[Description]";
}
?>
HTML Tables to show data
-------------------------------------------
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="63%" id="AutoNumber1">
<tr>
<td width="100%">Title Goes here</td>
</tr>
<tr>
<td width="100%">Description goes here</td>
</tr>
</table>
:help:
Code for getting data
-------------------------------------
<?php
$db = mysql_connect("localhost","sillyfoo_admin","5177ym4n");
mysql_select_db("sillyfoo_database1",$db);
//replace the above values with your actual database values
$res=mysql_query("SELECT * FROM News");
if(mysql_num_rows($res)==0) echo "There is no data in the table";
else
for($i=0;$i<mysql_num_rows($res);$i++) {
$row=mysql_fetch_assoc($res);
echo "ID : $row[Title] Name : $row[Description]";
}
?>
HTML Tables to show data
-------------------------------------------
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="63%" id="AutoNumber1">
<tr>
<td width="100%">Title Goes here</td>
</tr>
<tr>
<td width="100%">Description goes here</td>
</tr>
</table>
:help: