If your website is database driven, use something like this quick script I wrote to fetch the name, author, and URL link to ebooks in a virtual library:
Code:
<?php
$username="yourusername";
$password="yourpassword";
$database="yourdatabase";
$title=$_POST['title'];
$author=$_POST['author'];
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die("Unable to select database!");
$query="SELECT * FROM books_all WHERE Title = '$title' AND Author = '$author' AND url LIKE 'h%'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
if ($num == "")
{
echo "No results! <br><p></p><a href=http://www.yoursite.com/blah.html> Go back </a>";
}
else
{
echo "<h3> Search Results: </h3>";
}
$i=0;
while($i < $num) {
$title=mysql_result($result,$i,"Title");
$author=mysql_result($result,$i,"Author");
$url=mysql_result($result,$i,"url");
$i++;
}
?>
Bookmarks