im building a search engie for my site and i get and error:
mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\WINDOWS\Desktop\pagina\letras.com\search.php3 on line 7
y computer is the serevr so thats why the page is on c drive, mysql and php function perfectly.
the code is:
<?php
MYSQL_CONNECT("localhost","root","root");
MYSQL_SELECT_DB("letras");
$result = mysql_query("SELECT * FROM letras WHERE autor = $name");
echo "<table border=1>\n";
echo "<tr><td>Name</td><td>Position</tr>\n";
while ($myrow = mysql_fetch_row($result)) {
printf("<tr><td>%s %s</td><td>%s</td></tr>\n",
$myrow[1], $myrow[2], $myrow[3]);
}
echo "</table>\n";
?>