I want to display my whole database in a table, when I click on a link.
I have this, it shows the table, but it's NOT filled with my requested information, why?????
if ($index == 2)
{
$connection = mysql_pconnect ("localhost", "login", "password") or die ("Kan geen connectie maken");
mysql_select_db ("heins") or die ("Kan geen Database selecteren");
$string = "SELECT * from machines";
$result = mysql_query ($string) or die("Niet gelukt!!!");
print "<B>Totaaloverzicht: </B>";
print '<table border=10 width="90%" cellspacing=1>';
print '<tr bgColor="#cccccc">';
print '<td width="10%" bgcolor="#ffffff">#</td>';
print '<td width="10%" bgcolor="#ffffff"><u>Machine nr</u></td>';
print '<td width="20%" bgcolor="#ffffff"><u>Machine Naam</u></td>';
print '<td width="30%" bgcolor="#ffffff"><u>Omschrijving</u></td>';
print '<td width="15%" bgcolor="#ffffff"><u>Edit File</u></td>';
print '<td width="15%" bgcolor="#ffffff"><u>Delete File</u></td>';
print '</tr>';
while ($row = mysql_fetch_row($result))
{
print '<tr bgColor="#ddddd">';
print '<td>'.$row->RowNumber.'</td>';
print '<td>'.$row->machineID.'</td>';
print '<td>'.$row->nameID.'</td>';
print '<td>'.$row->description.'</td>';
print '</tr>';
}
print '</table>';
print "<p><a href='MachineDatabase1.php?index=0'>Klik hier om terug te gaan</a></p>";
}
Thanks!!