im trying to set up a search engine for my site, but i keep getting an error: Parse error: parse error, unexpected T_STRING in C:\WINDOWS\Desktop\pagina\letras.com\search.php3 on line 4
ive set up my computer to be the server thats why its on the c drive, php and mysql function perfectly. the code is:
<?php
MYSQL_CONNECT("localhost","root","root");
MYSQL_SELECT_DB("letras");
mysql_query(SELECT * FROM letras WHERE autor = $_POST['name']);
if ($myrow = mysql_fetch_array($result)) {
echo "<table border=1>\n";
echo "<tr><td>Name</td><td>Position</td></tr>\n";
do {
printf("<tr><td>%s %s</td><td>%s</tr>\n", $myrow["autor"], $myrow["titulo"], $myrow["texto"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
} else {
echo "Sorry, no records were found!";
}
?>