<?php
/*
--------------------------------------------------------------------------------------
Please make the essential changes as guided to make the best use of this class.
This is a very basic class to search a single string in your entire set of fields.
Please give me some time to add more features into it.
Please go through the following lines and make the necessary replacements in try.php
class.search.php as well.
--------------------------------------------------------------------------------------
*/
include "class.search.php";
// Replace <Hostname> with your host name, <Username> with your username,
// <Password> with your password and <Dbname> with your database name.
// Use $try=new search_fields("<Hostname>","<Dbname>") if you don't have username and password.
// Replace <tablename> with your table name and <keyword> with your search keyword.
// Go to the function "display()" and replace <field index> with any of your field name.
$try=new search_fields("<Hostname>","<Username>","<Password>","<Dbname>");
// Connect to database
$try->connect();
// Make the search string by passing the table name and keyword that may come from a form
// Replace <tablename> with your table name and <keyword> with your search keyword
echo $try->make_str("<tablename>","<keyword>");
// Match the keywords and display the result
$try->showresult();
?> |