hello..
im a beginner in php coding
im trying to implement a code to search for a name of a book in the mysql database
theres something wrong with it, because instead of selecting the query im searching for it shows the whole table i already made in the myadmin
here is the code...
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Retrieve Records from Db!</title>
</head>
<body>
<?php
$host = "localhost";
$user = "";
$password = "";
$table = "books";
mysql_connect($host,$user,$password) or die("Failed to connect");
mysql_select_db("POL") or die("Failed to select database");
//store the results of select in a big array called $result
$result = mysql_query("select * from $table) or die(mysql_error());
while ($row = mysql_fetch_array($result))
$sql = "Find INTO $table (ISBN,Author,Title,Keyword,Category)";
if (mysql_query($sql))
{
echo "ISBN: ";
$row["ISBN"];
echo "<br>";
echo "AUTHOR: ";
$row["Author"];
echo "<br>";
echo "TITLE: ";
$row["Title"];
echo "<br>";
echo "KEYWORD: ";
$row["Keyword"];
echo "<br>";
echo "CATEGORY: ";
$row["Category"];
echo "<br>";}
mysql_free_result($result); //now free the array.
echo "<br> <br>"
?>
<!--going back to start page-->
<a href="catalogue.htm"> Click Here to go back to entry page </a>
</body>
</html>can you please help me in where is going bad??
