Whats wrong with it, config.php is correct and i can connect to the databace.
<?php
include("config.php");
$tbl_name="news"; // Table name
// Retrieve data from database
$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);
// Start looping rows in mysql database.
while($rows=mysql_fetch_array($result)){
?>
<table width="400" border="1" cellspacing="0" cellpadding="3">
<tr>
<td width="10%"><? echo $rows['id']; ?></td>
<td width="30%"><? echo $rows['author']; ?></td>
<td width="30%"><? echo $rows['date']; ?></td>
<td width="100%"><? echo $rows['message']; ?></td>
</tr>
</table>
<?php
// close while loop
}
// close connection
mysql_close();
?>
Thanks Dan
<?php
include("config.php");
$tbl_name="news"; // Table name
// Retrieve data from database
$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);
// Start looping rows in mysql database.
while($rows=mysql_fetch_array($result)){
?>
<table width="400" border="1" cellspacing="0" cellpadding="3">
<tr>
<td width="10%"><? echo $rows['id']; ?></td>
<td width="30%"><? echo $rows['author']; ?></td>
<td width="30%"><? echo $rows['date']; ?></td>
<td width="100%"><? echo $rows['message']; ?></td>
</tr>
</table>
<?php
// close while loop
}
// close connection
mysql_close();
?>
Thanks Dan