Location: PHPKode > projects > Helpdesk Over Web > how/kb/kbsearch.php

// Allows searching of Solutions Knowledgebase

// Include Configuration File
require_once ('../includes/config.inc'); 

// Set the page title and include the HTML header.
$page_title = 'Helpdesk Over Web - Knowledgebase';
include ('../includes/header.html');

// Connect to Database
require_once ('../includes/mysql_connect.php');

echo ("<H1>Solutions Knowledgebase</H1>");

echo ("
<P>Welcome to the <B>H</B>elpdesk <B>O</B>ver <B>W</B>eb (HOW) Solutions Knowledgebase.
<P>Three search methods are available: category, keyword and free text.
<H4>Category Search</H4>
<FORM ACTION='searchcat.php' METHOD='post'>
<tr align='bottom'>
<td align='bottom'><select name='category'>");
	$sql = "SELECT * FROM kbcategories;";
	$catlist = mysql_query($sql)
	   or die("Invalid query: " . mysql_error());
	while($i = mysql_fetch_row($catlist)) 
		echo ("<OPTION>$i[1]</OPTION>");
echo ("</SELECT></td><td><INPUT TYPE='submit' NAME='submit' VALUE='Search'></td></tr></table></form>
<H4>Keyword Search</H4>
<FORM ACTION='searchkw.php' METHOD='post'>
<tr align='bottom'>
<td align='bottom'><input type='text' length='50' maxlength='50' name='kwsearch'></td><td><INPUT TYPE='submit' NAME='submit' VALUE='Search'></td></tr></table></form>
<H4>Free Text Search</H4>
<FORM ACTION='searchtxt.php' METHOD='post'>
<tr align='bottom'>
<td align='bottom'><input type='text' length='60' maxlength='60' name='txtsearch'></td><td><INPUT TYPE='submit' NAME='submit' VALUE='Search'></td></tr></table></form>
Return current item: Helpdesk Over Web