PHP Classes

File: try.php

Recommend this page to a friend!
  Classes of sujith nair   search_fields   try.php   Download  
File: try.php
Role: ???
Content type: text/plain
Description: The main php file that makes use of the class
Class: search_fields
Author: By
Last change:
Date: 23 years ago
Size: 1,413 bytes
 

Contents

Class file image Download
<?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(); ?>