il dababase in locale si chiama rubrica
la tabella si chiama nomi
la tabella contiene:
nome cognome --> intestazione
mario rossi
marco bianchi

il codice è:
<html>
<head>
<title>tabella </title>
</head>
<body>
<?php

$host = 'localhost';
$user = 'iorso';
$password = 'pippo';
$database = 'rubrica';

$conn = mysql_connect($host, $user, $password)
or die ("impossibile connettersi al server $host");

$query = "select * from 'nomi'";
$dbResult = mysql_query($query, $conn);
$AffectedRows = mysql_affected_rows($conn);

if ($AffectedRows == 0)
{
print("la tabella è vuota!");
}
else
{
print "<table border=\"1\">\n";

for ($index=0 ; $index<$AffectedRows ; $index++)
{
$row = mysql_fetch_row($dbResult);
if ($index==0)
{
print "<tr>\n";
foreach ($row as $k => $v)
{
$myfield = mysql_fetch_field($dbResult,$k);
print ("<td>" . $myfield->name . "</td>");
}
print "</tr>\n";
}
foreach ($row as $k => $v)
{ print ("<td>$v");
if ($k==0)
{ /*
qui puoi fare seguire un istruzione per ogni riga
esempio: se scrivi
echo '<a href="pagina.html>clicca qui</a> ';
per ogni riga di risultati ti apparira un link
*/}
print ("</td>");
}
print "</tr>\n";
}
print "</table>\n";
}
mysql_free_result($dbResult);
mysql_close($conn);

?>


l'errore a video è:
Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in C:\wamp\www\prova1\tabella.php on line 60

eliminando la riga 60
/* mysql_free_result($dbResult); */

lo schermo visualizzato è completamente bianco... nessuna tabella!

grazieeeeee